HTTPSocket url is not well-formed

I’m attempting to access a web service using oAuth & am getting the exception URL is not well formed when trying to post. Using the same generated URL in Safari on the simulator does work. Anybody got any idea?

The url is

It’s about time somebody made the Xero app more useful, Wayne… :wink:

(Sorry I can’t actually help with your issue)

Did you check that your URL doesn’t actually contain line breaks? It looks like the signature has line breaks in it.

No line breaks, works when pasted into safari.


Have you tried a product like Paw for testing your API calls? Something like that may help you narrow down errors like this. The reason I ask is that safari may not use NSURLConnection, so the results wouldn’t be the same as httpsocket. It would certainly help us narrow it down.

I am using the new http socket on Windows without problem. If I get an OSX version working will that help?

Most likely. The error you are getting could simply be that the server doesn’t accept HTTP/1.0 requests. The new sockets support 1.1 and beyond.