I'm attempting to add swagger as part of a locally developed project, but I'm finding that when I use the petstore example, requests incorrectly sends 'Accept: text/html' instead of the expected 'Accept: application/json', as specified in the petstore schema.
After banging my head against a wall, I realized that this issue seems to occur whenever you are running the swagger client on the same host (in this case, 'localhost') as the web services you are trying to call. If I change the web services to another port, it works just fine and sends application/json as expected (although this results in the expected CORS issues).
What gives? I'd expect the same headers to be sent whether the swagger ui client was accessing local or remote web services. Is this a bug or am I missing something obvious?