geofffranks / json-api

A perl module to simplify interaction with JSON APIs
Other
6 stars 6 forks source link

Provide access to request and response headers #2

Closed tlhackque closed 7 years ago

tlhackque commented 7 years ago

Adds optional argument to get, put, post and del that allows specifying additional HTTP headers.

Provides header method to list and return headers in response.

Provides response method to return the HTTP::Response object.

Treats HTTP_NOT_MODIFIED as a no-content success return.

fixes #1

tlhackque commented 7 years ago

Note: I reviewed the tests, and these changes don't seem to fit in the test structure, as they access LWP internals.

I manually tested the new methods and verified that they work as expected.

tlhackque commented 7 years ago

I've added some examples to the POD. They come from a real application, somewhat simplified for clarity.

geofffranks commented 7 years ago

Thanks!

tlhackque commented 7 years ago

Thanks for taking the changes, updating the license and making a prompt release to CPAN.

tlhackque commented 7 years ago

Merging back into my fork, noticed that you didn't tag yours with v1.1.0.

Might want to do that so GitHub shows it as a 'release'.

geofffranks commented 7 years ago

No problem! Thanks for the contribution :)

Sent from my iPhone

On Oct 23, 2016, at 4:46 PM, Timothe Litt notifications@github.com wrote:

Thanks for taking the changes, updating the license and making a prompt release to CPAN.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.