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

append HTTP headers with rest_client #496

Closed
liviuchircu opened this issue May 4, 2015 · 4 comments
Closed

append HTTP headers with rest_client #496

liviuchircu opened this issue May 4, 2015 · 4 comments
Assignees
Milestone

Comments

@liviuchircu
Copy link
Member

Follow-up of a discussion started with @jarrodb on IRC. In short, there are quite a lot of usage scenarios where additional HTTP headers need to be inserted into the request. So, the usage flow could be:

rest_append_hf("Authorization: Bearer mF_9.B5f-4.1JqM");
...
rest_get(...)
@jarrodb
Copy link

jarrodb commented May 5, 2015

Also, there may have been the potential for a memory leak in start_async_http_req where (struct curl_slist *) list was allocated at rest_methods.c:130 and hit goto error; at rest_methods.c:183 which bypassed the curl_slist_free_all(list); in the success: label.

Pull request #497 adds the free call to the error: label as well.

@bogdan-iancu
Copy link
Member

@jarrodb , thanks for your PR on this topic. @liviuchircu already accepted it, but could you please create a new PR updating the docs too (documenting the new script function) ?
Thanks and regards, Bogdan

@jarrodb
Copy link

jarrodb commented May 5, 2015

Yessir I will work on documentation for the additional command.

@bogdan-iancu
Copy link
Member

Thank you @jarrodb !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants