Unable to connect to remote server


Currently contains 1 post


July 30, 2012 16:17

mike tran

Joel Martinez (edit) Topic created 7 months ago Edit Topic
strangely, it seems like we’re getting an error all of a sudden doing a get request on an API URL like this: RequestUri = {http://api.sierratradingpost.com/api/1.0/product/2628H/?api_key=<theAPIKey>}

It’s a WebException stating: “Unable to connect to the remote server”.

I believe the URL is built correctly (the API key is correct in the code, I just replaced it with “theAPIKey” above) … thanks in advance

Message edited by Joel Martinez (edit) 7 months ago
WebException, API
Chris Lange (edit) – 7 months ago Edit Post

Hi Joel,

I’m sorry for the delay in getting back to you. I’m currently testing the API externally as well and am having problems. I’m contacting my contacts at Mashery and seeing what we can do to make things work correctly. I’ll post here as soon as service returns to normal.

Thanks, -Chris

Chris Lange (edit) – 7 months ago Edit Post


Just chatted with our API developer at Sierra Trading Post, and he mentioned the following as a possible fix:

Make sure your URL is all in lower case (in php use something like strtolower($requestUri)).

It turns out that Mashery does have issues with url’s that have uppercase characters in them.

RequestUri = {http://api.sierratradingpost.com/api/1.0/product/2628h/?api_key=<theAPIKey>} should work for you.

Let me know if it doesn’t!
Joel Martinez (edit) – 7 months ago Edit Post

Hi Chris, this did work … I changed my backend to lowercase the URLs before it makes the call. But fyi the ID was built by taking the ID that was returned from the search API (which was returned in upper case). So you may want to normalize this for other API users so they don’t have to do any special formatting on the URL, just build it up from the values returned from the API :-)

Reply to thread