Back to FabImage Library website
You are here: Start » Function Reference » HTTP » Http_SendRequest_GET

Http_SendRequest_GET
Header: | FIL.h |
---|---|
Namespace: | fil |
Sends a GET request to server and receives an answer.
Syntax
C++
C#
void fil::Http_SendRequest_GET ( const ftl::String& inUrl, const ftl::Array<ftl::String>& inFields, const ftl::Array<ftl::String>& inFieldsData, ftl::Conditional<ftl::String>& outAnswer, int& outResponseCode )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inUrl | const String& | Url of request. Without parameters. | |
![]() |
inFields | const Array<String>& | Request data to send. It will be automatically encoded. | |
![]() |
inFieldsData | const Array<String>& | Request data to send. It will be automatically encoded. | |
![]() |
outAnswer | Conditional<String>& | Answer text if provided in UTF-8 encoding. | |
![]() |
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: */*
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Different size of inFields and inFieldsData. |
See Also
- Http_SendRequest_POST_Raw – Sends a POST request to the server and receives an answer.