You are here: Start » FIL.NET » Function Reference » System » HTTP » FIL.Http_SendRequest_GET
Sends a GET request to server and receives a text answer.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void Http_SendRequest_GET ( string inUrl, IList<string> inFields, IList<string> inFieldsData, int inTimeout, INullable<string> outAnswer, out int outResponseCode )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inUrl | string | URL of request. Without parameters. | ||
![]() | 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. | ||
![]() | inTimeout | int | <0, INF> | 60 | Request timeout in seconds. Default value: 60. |
![]() | 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 GET request to the server. 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:
GET /test?param1=1¶m2=2 HTTP/1.1 Host: localhost User-Agent: FabImage/1.0 Accept: */*
Remarks
Filter only accepts text answers encoded using UTF-8 or plain ASCII. To receive answer in arbitrary format please use Http_SendRequest_GET_ByteBuffer.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Different size of inFields and inFieldsData in Http_SendRequest_GET. |
DomainError | Empty inUrl in Http_SendRequest_GET. |
DomainError | Invalid inUrl in Http_SendRequest_GET. |
DomainError | Secured HTTPS connection is not supported Http_SendRequest_GET. |