You are here: Start » FIL.NET » FIL.Http_SendRequest_POST_Raw
Sends a POST request to the server and receives an answer.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void Http_SendRequest_POST_Raw ( string inUrl, IList<string> inFields, IList<string> inFieldsData, INullable<string> outAnswer, out int outResponseCode )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inUrl | string | Url of request. | ||
![]() | inFields | System.Collections.Generic.IList<string> | Request data to send. It will be automatically encoded. | ||
![]() | inFieldsData | System.Collections.Generic.IList<string> | Request data to send. It will be automatically encoded. | ||
![]() | outAnswer | FilNet.INullable<string> | Answer text if provided in UTF-8 encoding. This parameter cannot be null. | ||
![]() | outResponseCode | int | Answer code. Typically 200 for OK. |
Description
Filter sends a POST request to the server using application/x-www-form-urlencoded format. Filter waits for the sever text answer.
Examples
Filter executed with parameters:
- inUrl = http://localhost/test
- inFields = ["param1", "param2"]
- inFieldsData = ["1", "2"]
Request sent to the server:
POST /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
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Different size of inFields and inFieldsData. |