Skip to content

Ajax: wrong Content-Type when uploading FormData #1729

Closed
@jachenry

Description

@jachenry

RxJS version:
5.0.0-beta.8

Code to reproduce:

Observable.ajax({
  url: ...,
  body: formData,
})

Expected behavior:
browser should be responsible for appending Content-Type of multipart/form-data; charset=utf-8; boundary=...

Actual behavior:
Content-Type is explicitly set in AjaxObservable

    if (!('Content-Type' in headers)) {
      headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions