Skip to content

b97eb775 69d3 9597 1c5c 145dfe3dc422

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

HTTPBased.HttpPOST Method

[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()

Return Value

Type: HTTPBased.ItemList
Processed HTTP Response

Remarks

 

Property Example Comments
Domain
www.mypostexample.com
```</td><td>Domain to Post to</td></tr><tr><td><a href="0f62953d-bf06-1f4a-2e51-0ac2d63ec4f1">ResourcePath</a></td><td>

/path/to/resource.wso

Accept: /\r\nHost: www.mypostexample.com\r\nAccept-Encoding: identity\r\nConnection: close\r\n

Notes.<br /><a href="a5e7432e-b6bf-f5e3-8d2f-7676f0dbc90a">QueryList</a> can be used for <a href="a7407ba4-a6f3-84ed-2d82-9b542afa60c9">QueryString</a>. In which case query parameters can be loaded as Name/Value pairs. <a href="eb98dca9-c16a-2d27-f8b9-4f839a31a56a">HeaderList</a> can be used for <a href="a33ca7f1-3bda-8c69-2c32-2184e504188e">HeaderString</a>. In which case Header items parameters can be loaded as Name/Value pairs. When this is done, <a href="0f62953d-bf06-1f4a-2e51-0ac2d63ec4f1">ResourcePath</a> must be loaded if valid Request is to be sent. 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 <a href="eb98dca9-c16a-2d27-f8b9-4f839a31a56a">HeaderList</a>)

## 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