You are here: Start » Filter Reference » System » HTTP » Http_SendRequest_PATCH_ByteBuffer
Module: | FoundationLite |
---|
Sends a PATCH request to the server and receives a text answer.
Name | Type | Range | Description | |
---|---|---|---|---|
![]() |
inUrl | String | URL of request. | |
![]() |
inHeaders | StringArray | Request headers to send. They will be automatically encoded. | |
![]() |
inHeadersData | StringArray | Request headers to send. They will be automatically encoded. | |
![]() |
inFields | StringArray | Request data to send. It will be automatically encoded. | |
![]() |
inFieldsData | StringArray | Request data to send. It will be automatically encoded. | |
![]() |
inTimeout | Integer | 0 - ![]() |
Request timeout in seconds. |
![]() |
inAllowUntrusted | Bool | Whether or not to allow untrusted SSL certificates. | |
![]() |
inCaCertFile | File* | File holding one or more certificates to verify the peer with. | |
![]() |
outAnswer | ByteBuffer? | Answer as a binary byte buffer. | |
![]() |
outResponseCode | Integer | Answer code. Typically 200 for OK. |
Description
Filter sends a PATCH request to the server using application/x-www-form-urlencoded format. Filter waits for the server binary answer.
When inCaCertFile is set to Auto, certificates installed in the operating system are used, otherwise only certificates from the input file are used.
Examples
Filter executed with parameters:
- inUrl = http://localhost/test
- inFields = ["param1", "param2"]
- inFieldsData = ["1", "2"]
Request sent to the server:
PATCH /test HTTP/1.1 Host: localhost User-Agent: FabImage/1.0 Accept: */* Content-Length: 17 Content-Type: application/x-www-form-urlencoded param1=1¶m2=2
It is also possible to include custom headers in the request. For this purpose, inHeaders and inHeadersData parameters are used.
Using the following values for these parameters:
- inHeaders = ["Header1", "Header2"]
- inHeadersData = ["value1", "value2"]
causes the following headers to be added to the request:
Header1: value1 Header2: value2
Remarks
Filter only accepts text answers encoded using UTF-8 or plain ASCII. To receive answer in arbitrary format please use Http_SendRequest_PATCH_ByteBuffer.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Different size of inFields and inFieldsData in Http_SendRequest_PATCH_ByteBuffer. |
DomainError | Different size of inHeaders and inHeadersData in Http_SendRequest_PATCH_ByteBuffer. |
DomainError | Empty inUrl in Http_SendRequest_PATCH_ByteBuffer. |
DomainError | Invalid inUrl in Http_SendRequest_PATCH_ByteBuffer. |
Complexity Level
This filter is available on Basic Complexity Level.
Disabled in Lite Edition
Filter Group
This filter is member of Http_SendRequest_PATCH filter group.
See Also
- Http_SendRequest_PATCH_JSON – Sends a PATCH request in JSON format to the server and receives a text answer.