Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Getting Started >

timout on PUT request

Started by Yorgan Cuenca -   in Getting Started

I've tried with both wrapper classes for PHP to use the PUT method, but I keep getting this error:

Error Curl error: Operation timed out after 10015 milliseconds with 0 bytes received

I can use POST without problem in most of the cases, but with payments there's no POST option, so I'm stuck.

Did anybody find the same problem? Did anybody find a solution?

I just found out that I can use POST, and it works.

Yorgan Cuenca  

You can set the timeout period for Curl within the wrapper. Extending this beyond 10 seconds will provide more time to receive a response from the Xero API.

A description of the two options is here.

They can be set within the XeroOAuth PHP Wrapper.

Riley James (Community Manager)  

Hi Riley,
and thanks for your answer.
I set a timeout of 30 secs, but it didn't make any difference:

Curl error: Operation timed out after 30015 milliseconds with 0 bytes received

I also tried 60 seconds, but the result did not change.

Like I said, if I use POST there's no problem and it takes less than 10 seconds. So I don't understand why PUT is not working.

Yorgan Cuenca  

Same issue.


mitch harris  

I stopped using PUT.

Yorgan Cuenca  

What if you are trying to add a payment and the only option is to PUT?

mitch harris  

Got it my bad...

mitch harris  

use POST. I used, it works, at least for creation of new payments. You're not supposed to be able to change payments anyway.

Yorgan Cuenca  

Same here... PUT is broken. Stopped working without warning. Requests timeout, no error messages. Switching to POST took care of it.

Larry Chase