aurelia / http-client

A simple, restful, message-based wrapper around XMLHttpRequest.
MIT License
62 stars 59 forks source link

response message should use json as the fallback if the server did not specify a Content-Type #63

Closed Aaike closed 9 years ago

Aaike commented 9 years ago

The responseType used to default to json , now it defaults to null when no Content-Type is present in the response header.

This causes users to have to manually parse the response.content using JSON.parse()

Aaike commented 9 years ago

The user did have a content-type, it was just an incorrect one. so not setting responseType to json was the correct behavior. plus this scenario is covered by the unit tests.