Skip to content

typescript-fetch-api: Don't set the Content-Type when using multipart-formdata #56

@grantyb

Description

@grantyb

The template sets the Content-Type header in all cases, but it should not when using the fetch() API for multipart-formdata, as per this MDN documentation:

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest_API/Using_FormData_Objects

Image

The issue is on this line:

localVarHeaderParameter.set('Content-Type', '{{{mediaType}}}');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions