avadev / AvaTax-Calc-REST-PHP

PHP sample for the AvaTax Calc REST API
Apache License 2.0
9 stars 28 forks source link

Request: Add more control over the HTTP request and response #17

Closed maorcatmyheritage closed 8 years ago

maorcatmyheritage commented 9 years ago

This is a request, not a bug: The requests below refer to \AvaTax\TaxServiceRest::getTax() function.

  1. The code doesn't give option to set some important HTTP request params, such as timeout. This can be very useful.
  2. The code doesn't check the response and status codes in case of error and doesn't return it to the caller. Thus, we don't have any option to handle errors (error due timeout, bad request, etc)
skylord123 commented 8 years ago

I fixed the second thing you mentioned inside of #33

I am looking into a good way to do the first thing.

skylord123 commented 8 years ago

Alright, I modified my PR to add in the ability to define custom cURL options.

PR: https://github.com/avadev/AvaTax-Calc-REST-PHP/pull/33 commit: a55f5bcc59cf2e8d0c7f20dc9d61a4c8e7725d9a