After a bit more research, it seems that since my connection is using HTTP/2, there is no Reason-Phrase... So I'll need to parse the json in the body.
https://tools.ietf.org/html/rfc7540#section-8.1.2.4
DEBUG: http_async_client [async_http.c:162]: async_http_cb(): query result = HTTP/2 202 date: Wed, 10 Feb 2021 18:59:10 GMT server: Apache/2.4.46 strict-transport-security: max-age=15552000; includeSubDomains content-length: 46 vary: User-Agent content-type: application/json; charset=utf-8
{"result": {"code": 202, "title": "Accepted"}} [270]
On Wednesday, February 10, 2021 1:24:09 AM CST Federico Cabiddu wrote:
Hi, just tested on latest 5.4 (ubuntu 20.04, curl 7.68.0) and http_rr works as expected, returning the reason phrase. Can you give some more detail and maybe run a test with increased debug level?
Regards,
Federico
On Wed, Feb 10, 2021 at 4:14 AM Anthony Joseph Messina <
amessina@messinet.com> wrote:
https://www.kamailio.org/docs/modules/stable/modules/http_async_client says $http_rr will be the HTTP reason phrase. I'm understanding this to mean:
Code: Reason: 200 OK 404 Not Found
In my current 5.4 build, $http_rr returns empty (not <null> or anything else) regardless of what the server sends in the headers.
Am I misunderstanding this? I'm writing an API and was hoping to do
send_reply("$http_rs", "$http_rr");