Lines Matching refs:is_ok
111 local is_ok, connection = tcp_sync.connect {
118 if not is_ok then
123 logger.errx(task, 'connect_sync %1, %2', is_ok, tostring(connection))
125 is_ok, err = connection:write('GET /request_sync HTTP/1.1\r\nConnection: keep-alive\r\n\r\n')
127 logger.errx(task, 'write %1, %2', is_ok, err)
128 if not is_ok then
136 is_ok, data = connection:read_once();
137 logger.errx(task, 'read_once: is_ok: %1, data: %2', is_ok, data)
138 if not is_ok then
152 is_ok, err = connection:write("POST /request2 HTTP/1.1\r\n\r\n")
153 logger.errx(task, 'write[2] %1, %2', is_ok, err)
157 is_ok, data = connection:read_once();
158 logger.errx(task, 'read_once[2]: is_ok %1, data: %2', is_ok, data)
159 if not is_ok then
185 local is_ok, connection = tcp_sync.connect {
192 logger.errx(task, 'connect_sync %1, %2', is_ok, tostring(connection))
193 if not is_ok then
198 …is_ok, err = connection:write(string.format('%s %s HTTP/1.1\r\nConnection: close\r\n\r\n', method:…
200 logger.errx(task, 'write %1, %2', is_ok, err)
201 if not is_ok then
210 is_ok, header_line = connection:read_until("\r\n")
211 if not is_ok then
234 is_ok, content = connection:read_bytes(content_length)
235 if is_ok then
239 is_ok, content = connection:read_until_eof()
240 if is_ok then
244 logger.errx(task, '(is_ok: %1) content [%2 bytes] %3', is_ok, content_length, content)