Automatically add XMLHttpRequest header? #37

Open
opened 2016-01-29 08:43:19 +00:00 by martinsik · 0 comments
martinsik commented 2016-01-29 08:43:19 +00:00 (Migrated from github.com)

Hey, I was thinking that FileUploader class could automatically add X-Requested-With: XMLHttpRequest header. I think it makes sense because all requests are Ajax request, although I'm not sure this is correct behaviour according to the standard.
I've noticed there's already commented out setRequestHeader() so at least it would be nice if I could set it manually.

Hey, I was thinking that [FileUploader](https://github.com/valor-software/ng2-file-upload/blob/master/components/file-upload/file-uploader.ts) class could automatically add `X-Requested-With: XMLHttpRequest` header. I think it makes sense because all requests are Ajax request, although I'm not sure this is correct behaviour according to the standard. I've noticed there's already commented out [setRequestHeader()](https://github.com/valor-software/ng2-file-upload/blob/master/components/file-upload/file-uploader.ts#L331) so at least it would be nice if I could set it manually.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#37