Skip to content

c8d3a3d5 b43f 84c9 03d3 8b0d6ab60f11

Mat Walker edited this page Apr 17, 2020 · 1 revision

HTTPBased.HttpPOST Method (String, String, String, String, String)

[This is preliminary documentation and is subject to change.]

Performs an HTTP POST to the required Domain/ResourcePath containing given HTTP Header and Body

Namespace: TeamControlium.NonGUI
Assembly: TeamControlium.NonGUI (in TeamControlium.NonGUI.dll) Version: 2.0.0

Syntax

C#

public HTTPBased.ItemList HttpPOST(
	string domain,
	string resourcePath,
	string query,
	string header,
	string body
)

Parameters

 

domain
Type: System.String
Domain to POST to. IE.
www.mytestsite.com
```</dd><dt>resourcePath</dt><dd>Type: <a href="https://docs.microsoft.com/dotnet/api/system.string" target="_blank">System.String</a><br />Resource path at domain. IE. 

respource/path


#### Return Value
Type: <a href="7d03ba9a-865f-5f56-6af4-b72569bae49a">HTTPBased.ItemList</a><br />Processed HTTP Response

## Remarks
Content-Length header item is automatically added (or, if exists in given header, modified) during building of Request. If Connection keep-alive is used, currently request will time-out on waiting for response. Intelligent and async functionality needs building in. Aspects of request (such as port, header/request layout etc.) can be modified using settings stored in Repository. See <a href="72120597-6fa2-1437-26de-f3477e705880">HTTPBased</a> and documentation for details of Repository items referenced.
&nbsp;<table><tr><th>Item Name</th><th>Example</th><th>Comments</th></tr><tr><td>HTTPVersion</td><td>1.1</td><td>HTTP Version - Always in Processed response</td></tr><tr><td>StatusCode</td><td>200</td><td>Status code - Always in Processed response</td></tr><tr><td>StatusText</td><td>OK</td><td>Status text - Always in Processed response</td></tr><tr><td>Cache-Control</td><td>private; max-age=0</td><td>Dependant on server and application</td></tr><tr><td>Content-Length</td><td>346</td><td>Number of characters in Body - Always in Processed response</td></tr><tr><td>Content-Type</td><td>text/xml; charset=utf-8</td><td>Type of body data - Always in Processed response</td></tr><tr><td>Server</td><td>Server</td><td>Dependant on server and application</td></tr><tr><td>Web-Service</td><td>DataFlex 18.1</td><td>Dependant on server and application</td></tr><tr><td>Access-Control-Allow-Origin</td><td>http</td><td /></tr><tr><td>Access-Control-Allow-Methods</td><td>GET</td><td>POST</td><td /></tr><tr><td>Access-Control-Allow-Headers</td><td>content-type</td><td /></tr><tr><td>Access-Control-Allow-Credentials</td><td>true</td><td /></tr><tr><td>Strict-Transport-Security</td><td>max-age=31536000</td><td /></tr><tr><td>Date</td><td>Tue, 07 Apr 2020 22</td><td>Server date</td></tr><tr><td>Connection</td><td>close</td><td>Indicates what state the Server will hold connection at end of response - Always in Processed response</td></tr><tr><td>Body</td><td><http><body>hello</body></http></td><td>Raw body of HTTP Response</td></tr></table>&nbsp;
Note. HTTP Content-Length header item in request will automatically be added (or updated if already in header)

## See Also


#### Reference
<a href="72120597-6fa2-1437-26de-f3477e705880">HTTPBased Class</a><br /><a href="81af63c9-3169-e8c8-19f7-9fc82fd9d500">HttpPOST Overload</a><br /><a href="7c8197c9-2a4b-3073-068f-4bdf12fc0e2c">TeamControlium.NonGUI Namespace</a><br />
Clone this wiki locally