Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http_client module error to post the hdr part into http_client_query #1364

Closed
SurendraPlivo opened this issue Dec 13, 2017 · 3 comments
Closed

Comments

@SurendraPlivo
Copy link

SurendraPlivo commented Dec 13, 2017

Description

There is problem with http_client module they don't have the 4 paramterized export function.

Troubleshooting

we trouble shoot it and found problem with http_client module

Reproduction

http_client_query("http://tutpro.com/index.php", "{ "alert": "Alert text goes here" }", "Content-Type: application/json","$var(result)");

Additional Information

  • Kamailio Version - output of kamailio -v
    5.0.2
(paste your output here)
@linuxmaniac
Copy link
Member

I think this is not correct:

http_client_query("http://tutpro.com/index.php", "{ "alert": "Alert text goes here" }", "Content-Type: application/json","$var(result)");

It should be:

http_client_query("http://tutpro.com/index.php",'{ "alert": "Alert text goes here" }', "Content-Type: application/json","$var(result)");

Please try. If it does not work, please provide the output with debug enabled

@miconda
Copy link
Member

miconda commented Dec 13, 2017

Besides having proper parameters format, note that the function with 4 parameters was mistakenly exported as http_query (an error propagated by the move from utils module), latest 5.0 branch has it correct now as http_client_query, so upgrade to use latest 5.0 branch.

@miconda
Copy link
Member

miconda commented Dec 20, 2017

Reopen if still an issue after the above comments.

@miconda miconda closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants