You are here: Start » AVL.NET » AVL.Http_SendRequest_POST_JSON
Sends a POST request in JSON format to the server and receives answer.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void Http_SendRequest_POST_JSON ( string inUrl, string inJsonData, INullable<string> outAnswer, out int outResponseCode )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() | inUrl | string | Url of request. | ||
![]() | inJsonData | string | Request JSON to send. | ||
![]() | outAnswer | AvlNet.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/json format. Filter waits for the text sever answer.
Examples
Filter executed with parameters:
- inUrl = http://localhost/test
- inJsonData = "{'value': 5}"
Request sent to the server:
POST /test HTTP/1.1
Host: localhost
User-Agent: Adaptive Vision/1.0
Accept: application/json
Content-Type: application/json
charset: utf-8
Content-Length: 12
{'value': 5}


