HTTP

Frends.HTTP.SendBytes / 1.6.0

Summary

Sends a binary body and returns the response as text.

Typical use — uploading a file to an API that answers with JSON or a plain status message

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

Input class

Name Type Default Example Description
Method Method POST GET

The HTTP Method to be used with the request.

Possible values:

  • POST: POST Request.

  • PUT: PUT Request.

  • PATCH: PATCH Request.

  • DELETE: DELETE Request.

  • HEAD: HEAD Request.

  • OPTIONS: OPTIONS Request.

  • CONNECT: CONNECT Request.

Url String https://example.org/path/to https://example.org/path/to

The URL with protocol and path. You can include query parameters directly in the url.

ContentBytes Byte[] { "Body": "Message" }

The content to send as byte array

Headers Header[] Name: Header, Value: HeaderValue

List of HTTP headers to be added to the request.

An unhandled error has occurred. Reload 🗙