Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Disable certain $http headers for an individual request #1587

@groner

Description

@groner

I'm using $http with FormData to send multiple files, and I need to not set Content-Type, or the browser will not set Content-Type and the multipart boundary won't be known.

I can do this by saving, deleting, and restoring the header in $http.defaults.headers, but It would be a lot nicer to do $http.post(url, data, {headers: {'Content-Type': null}}).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions