SendBytes
HTTP request to send content in byte array.
Task version: 1.6.0
Required Frends version: 5.5+
Required .NET version: 6.0
Compatible Agents: Crossplatform
Task Parameters
Method : Method
The HTTP Method to be used with the request.
Possible values:
POST: The HTTP Method to be used with the request.PUT: The HTTP Method to be used with the request.PATCH: The HTTP Method to be used with the request.DELETE: The HTTP Method to be used with the request.HEAD: The HTTP Method to be used with the request.OPTIONS: The HTTP Method to be used with the request.CONNECT: The HTTP Method to be used with the request.
Default: 0
Example: GET
Url : String
The URL with protocol and path. You can include query parameters directly in the url.
Default: https://example.org/path/to
Example: https://example.org/path/to
ContentBytes : Byte[]
The content to send as byte array
Default: -
Example: { "Body": "Message" }
Headers : Header[]
List of HTTP headers to be added to the request.
Default: -
Example: Name: Header, Value: HeaderValue
Authentication : Authentication
Method of authenticating request
Possible values:
None: Method of authenticating requestBasic: Method of authenticating requestWindowsAuthentication: Method of authenticating requestWindowsIntegratedSecurity: Method of authenticating requestOAuth: Method of authenticating requestClientCertificate: Method of authenticating request
Default: -
Example: OAuth
Username : String
If WindowsAuthentication is selected you should use domain\username
Default: -
Example: Username
🗝Password : String
Password for the user
Default: -
Example: Password123
🗝Token : String
Bearer token to be used for request. Token will be added as Authorization header.
Default: -
Example: Token123
UseProxy : Boolean
Whether to route requests through a proxy server. When set to true, the ProxyUrl must be provided.
Default: False
Example: false
ProxyUrl : String
Proxy URL used for the request.
Default: -
Example: http://proxy.example.com:8080
ProxyUsername : String
Username for proxy authentication. Leave empty if proxy does not require authentication.
Both username and password must be provided together or left empty.
Default: -
Example: Username
🗝ProxyPassword : String
Password for proxy authentication. Leave empty if proxy does not require authentication.
Both username and password must be provided together or left empty.
Default: -
Example: Password123
ClientCertificateSource : CertificateSource
Specifies where the Client Certificate should be loaded from.
Possible values:
CertificateStore: Specifies where the Client Certificate should be loaded from.File: Specifies where the Client Certificate should be loaded from.String: Specifies where the Client Certificate should be loaded from.
Default: 0
Example: File
ClientCertificateFilePath : String
Applicable only when Certificate Source is "File".
Path to the Client Certificate, pfx (pkcs12) files are recommended. For other supported formats, see
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2collection.import?view=netframework-4.7.1
Default: -
Example: domain\path
ClientCertificateInBase64 : String
Applicable only when Certificate Source is "String".
Client certificate bytes as a base64 encoded string, pfx (pkcs12) format is recommended. For other supported formats, see
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2collection.import?view=netframework-4.7.1
Default: -
Example: domain\path
🗝ClientCertificateKeyPhrase : String
Applicable only when Certificate Source is "File" or "String".
Key phrase (password) to access the certificate data
Default: -
Example: string value
CertificateThumbprint : String
Applicable only when Certificate Source is "CertificateStore".
Thumbprint for using client certificate authentication.
Default: -
Example: thumbprint
CertificateStoreLocation : CertificateStoreLocation
Applicable only when Certificate Source is "CertificateStore".
Store location for the certificate.
Possible values:
CurrentUser: Applicable only when Certificate Source is "CertificateStore".
Store location for the certificate.
LocalMachine: Applicable only when Certificate Source is "CertificateStore".
Store location for the certificate.
Default: 0
Example: CurrentUser
LoadEntireChainForCertificate : Boolean
Should the entire certificate chain be loaded from the certificate store and included in the request. Only valid when using Certificate Store as the Certificate Source
Default: True
Example: true
ConnectionTimeoutSeconds : Int32
Timeout in seconds to be used for the connection and operation.
Default: 30
Example: 30
FollowRedirects : Boolean
If FollowRedirects is set to false, all responses with an HTTP status code from 300 to 399 is returned to the application.
Default: True
Example: true
AllowInvalidCertificate : Boolean
Do not throw an exception on certificate error.
Default: -
Example: true
AllowInvalidResponseContentTypeCharSet : Boolean
Some Api's return faulty content-type charset header. This setting overrides the returned charset.
Default: -
Example: true
ThrowExceptionOnErrorResponse : Boolean
Throw exception if return code of request is not successfull
Default: -
Example: true
AutomaticCookieHandling : Boolean
If set to false, cookies must be handled manually. Defaults to true.
Default: True
Example: true
HttpProtocolVersion : HttpVersion
HTTP protocol version to use for requests. HTTP/1.1 is the default and most compatible option.
Possible values:
Http11: HTTP protocol version to use for requests. HTTP/1.1 is the default and most compatible option.Http20: HTTP protocol version to use for requests. HTTP/1.1 is the default and most compatible option.
Default: 0
Example: Http11
SslProtocolVersion : SslVersion
SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Possible values:
Default: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Tls12: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Tls13: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Tls12And13: SSL/TLS protocol version to use for secure connections. Default lets the OS decide, which matches previous behavior.
Use Tls12 or Tls12And13 if the server requires a specific version.
Default: 0
Example: Default
Task Result
Body : String
Body of response
Example: {"id": "abcdefghijkl123456789", "success": true, "errors": []}
Headers : Dictionary<String, String>
Headers of response
Example: {[ "content-type": "application/json", ... ]}
StatusCode : Int32
Statuscode of response
Example: 200
Task Changelog
Changelog for Task Frends.HTTP.SendBytes.
[1.6.0] - 2026-05-13
Added
Added UseProxy, ProxyUrl, ProxyUsername, ProxyPassword, HttpProtocolVersion, and SslProtocolVersion options with proxy handler and protocol configuration support.
[1.5.0] - 2026-03-02
Added
Added CertificateStoreLocation option to allow selection between CurrentUser and LocalMachine certificate stores when using certificate authentication.
[1.4.0] - 2025-10-10
Changed
Changed the return type of SendBytes from Task to Task
[1.3.0] - 2025-03-25ChangedUpdate packages: Newtonsoft.Json 12.0.1 -> 13.0.3 System.ComponentModel.Annotations 4.7.0 -> 5.0.0 System.Runtime.Caching 7.0.0 -> 9.0.3 coverlet.collector 3.1.0 -> 6.0.4 Microsoft.NET.Test.Sdk 16.7.0 -> 17.13.0 MSTest.TestAdapter 2.1.2 -> 3.8.3 MSTest.TestFramework 2.1.2 -> 3.8.3 nunit 3.12.0 -> 4.3.2 NUnit3TestAdapter 3.17.0 -> 5.0.0 RichardSzalay.MockHttp 6.0.0 -> 7.0.0 xunit.extensibility.core 2.4.2 -> 2.9.3
[1.2.0] - 2025-04-10ChangedUpdated the default display format for the
ContentBytesoption toExpression.
[1.1.0] - 2024-12-30ChangedDescriptions of ClientCertificate suboptions includes clearer information about usage in terms of different types of ClientCertificate.
[1.0.0] - 2023-05-30AddedInitial implementation.
Last updated
Was this helpful?

