dariooddenino / purescript-simple-ajax

An opionated library to work with AJAX and JSON
17 stars 7 forks source link

Should p-s-a default to 'application/json' in _R methods? #4

Open AlexMouton opened 4 years ago

AlexMouton commented 4 years ago

Hi Dario Just another thought. I was a little surprised that I had to set this header myself, when I just wanted to add Authorization.

Thanks A

dariooddenino commented 4 years ago

Hello Alex! The Accept (MediaType "application/json") is already in there in the default request. If you pass your own headers the default one gets overwritten.

I'm not sure it would be a great idea to force again that header on top afterwards, as it would make it impossible to accept different meda types.