purescript-contrib/purescript-affjax

document the default withCredentials = false

Opened this issue · 0 comments

The convenience functions (put, get, etc.) rely on the defaultRequest object. This is defined with the field 'withCredentials' to be false. This default will prevent browsers from storing cookies sent by a server on cross-domain requests (CORS). That is all according to specifications, but it took me a lot of time before I realized this caused the problem with authenticating with Couchdb that I worked on the last few days :-(.
As the content of the defaultRequest object is not in the module documentation, it is a somewhat hidden feature. Also, nothing will show up on the headers and content of requests and responses, making it hard to debug.

So I propose to include the defaults in the documentation, or to mention at least the 'withCredentials' value somewhere.