nl_tokens: Adds the headers - object to xhr - headers .
pl_tokens: function ( xhr , promise , headers , method ) { // XDR cannot set requestheaders, only XHR: if ( ! xhr . _isXDR ) { var name ; if ( ( method !== "POST" ) && ( method !== "PUT" ) ) { // force GET-request to make a request instead of using cache (like IE does): headers [ "If-Modified-Since" ] = "Wed, 15 Nov 1995 01:00:00 GMT" ; // header "Content-Type" should only be set with POST or PUT requests: delete headers [ CONTENT_TYPE ] ; } // set all headers for ( <mask> in headers ) { xhr . setRequestHeader ( name , headers [ name ] ) ; } // in case of POST or PUT method: always make sure "Content-Type" is specified ! BODY_METHODS [ method ] || ( headers && ( CONTENT_TYPE in headers ) ) || xhr . setRequestHeader ( CONTENT_TYPE , DEF_CONTENT_TYPE_POST ) ; } }