2022.08.05 05:20 AM
Is there a way to access the HTTP status code (ex: HTTP/1.1 200 OK) after a call to .Q.hmb?
Thanks
2022.08.08 12:09 AM
.Q.hmb
, return is two strings, first one is HTTP response headers:q).Q.hmb["https://httpbin.org/get";`GET;()] "HTTP/1.1 200 OK\r\ndate: Fri, 05 Aug 2022 13:14:33 GMT\r\ncontent-type: appl.. "{\n \"args\": {}, \n \"headers\": {\n \"Accept-Encoding\": \"gzip\", \n..
q)r:.Q.hmb["https://httpbin.org/get";`GET;()] q)first "\r\n" vs r[0] "HTTP/1.1 200 OK"
2022.08.08 12:09 AM
.Q.hmb
, return is two strings, first one is HTTP response headers:q).Q.hmb["https://httpbin.org/get";`GET;()] "HTTP/1.1 200 OK\r\ndate: Fri, 05 Aug 2022 13:14:33 GMT\r\ncontent-type: appl.. "{\n \"args\": {}, \n \"headers\": {\n \"Accept-Encoding\": \"gzip\", \n..
q)r:.Q.hmb["https://httpbin.org/get";`GET;()] q)first "\r\n" vs r[0] "HTTP/1.1 200 OK"
2022.08.08 02:13 PM
I was using q v3.4 and getting only 1 string back from .Q.hmb. When I used q v4.0, I got the 2 string response you mentioned. Thank you for the help.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.