jwagenleitner / groovy-wslite

Lightweight SOAP and REST webservice clients for Groovy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different behaviour for POST JSON on Mac OSX than Linux

antony opened this issue · comments

Hi,

So here's the scenario - I work as part of a team of developers, 3 mac users, and 2 linux users.

We're using RESTClient to POST to an URL as part of our acceptance tests and retrieve some JSON. The receiving server is a locally running NodeJS server running Hapi.

We had a scenario whereby we would get 404 for every post to an URL, even though the url we copy pasted from the exception and put into Postman RESTClient, CURL, etc was valid and returned our JSON payload.

This would only happen on the Mac machines.

After a lot of debugging it turned out that setting the 'Accept' header to 'application/json' made the request work.

But it's strange that this doesn't affect Linux machines, only Mac.

Any ideas?