0

I'm using the Etsy API to get products on a Tomcat7 server deployed on Azure. Most of the time it just works but when I go for a certain subcategory I get no results back.

The weird thing is that on my developer machine it works and I do get back results.

How is that possible? How do I even start debugging this? Again, for some categories the call works both on my developer machine and Azure, but for others it only works on my developer machine.

This is the URL that is causing the problem:

https://openapi.etsy.com/v2/listings/active?&api_key=myapikey&keywords=star+&limit=24&offset=0&sort_on=created&sort_order=down&category=Vintage%2FJewelry
Eddy
  • 3,533
  • 13
  • 59
  • 89

1 Answers1

0

The problem was that when I created the URL I used Java's File.separator to separate between two parts of the URL. It worked on my OSX machine because File.separator is "/" and that's fine. But on Azure's windows servers File.separator is "\" - and it breaks the URL.

The lesson: think before writing code. Don't do it on autopilot.

Eddy
  • 3,533
  • 13
  • 59
  • 89