Skip to content

Streaming files to API (uploading) without multipart/form-data #1422

@maeni70

Description

@maeni70

Expected Behavior

Allow sending files in chunks (via stream) without multipart/form-data.

The same question has already been asked at stackoverflow:
https://stackoverflow.com/questions/35478663/upload-file-without-multipart-form-data-using-restsharp

However, it has not been correctly answered.

Is there any way how to stream large files to an API but without multipart/form-data? I retrieve an "UnsupportedMediaType" response when trying to do so. It seems that RestSharp is automatically sending the request as multipart/form-data if files are attached in body.

There are examples how to do with .NET HttpWebRequest (see linked stackoverflow question above) or Java, but I could not achieve with RestSharp library.

Thanks,
Roger

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions