Back to FabImage Library website
You are here: Start » Function Reference » System » HTTP » Http_SendCustomRequest
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Sends a custom HTTP request.
Syntax
C++
C#
void fil::Http_SendCustomRequest ( const fil::HTTPRequestMethod::Type& inMethod, const ftl::String& inUrl, const ftl::Array<ftl::String>& inUrlParameters, const ftl::Array<ftl::String>& inUrlParametersData, const ftl::Array<ftl::String>& inHeaders, const ftl::Array<ftl::String>& inHeadersData, const fil::ByteBuffer& inData, int inTimeout, bool inAllowUntrusted, const ftl::Optional<ftl::File>& inCaCertFile, ftl::Conditional<fil::ByteBuffer>& outAnswer, int& outResponseCode )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inMethod | const HTTPRequestMethod::Type& | GET | Method of the request. | |
![]() |
inUrl | const String& | URL of the request. | ||
![]() |
inUrlParameters | const Array<String>& | URL parameters. They will be automatically encoded. | ||
![]() |
inUrlParametersData | const Array<String>& | URL parameters. They will be automatically encoded. | ||
![]() |
inHeaders | const Array<String>& | Request headers to send. They will be automatically encoded. | ||
![]() |
inHeadersData | const Array<String>& | Request headers to send. They will be automatically encoded. | ||
![]() |
inData | const ByteBuffer& | Binary data to be sent. | ||
![]() |
inTimeout | int | 0 - ![]() |
60 | Request timeout in seconds. |
![]() |
inAllowUntrusted | bool | False | Whether or not to allow untrusted SSL certificates. | |
![]() |
inCaCertFile | const Optional<File>& | NIL | File holding one or more certificates to verify the peer with. | |
![]() |
outAnswer | Conditional<ByteBuffer>& | Answer data. | ||
![]() |
outResponseCode | int& | Answer code. Typically 200 for OK. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Different size of inHeaders and inHeadersData in Http_SendCustomRequest. |
DomainError | Different size of inUrlParameters and inUrlParametersData in Http_SendCustomRequest. |