Skip to content

1d960aa9 6104 6979 9e14 ebbb5b8b24ab

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

HTTPBased.HttpGET Method

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

Performs an HTTP GET to the required Domain/ResourcePath containing given HTTP Query-string Header and Body (if given)

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

Syntax

C#

public HTTPBased.ItemList HttpGET()

Return Value

Type: HTTPBased.ItemList
Processed HTTP Response

Remarks

 

Property Example Comments
Domain postman-echo.com Domain to request GET to
ResourcePath /get Resource Path
QueryString foo1=bar1&foo2=bar2 Query String
HeaderString Accept: /\r\nHost: postman-echo.com\r\nAccept-Encoding: identity\r\nConnection: close\r\n Header items String
Body null (Not even set, NonGUI will default to null) Body String
  Notes.
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 HTTPBased and documentation for details of Repository items referenced.
Processed HTTP Response is passed back as a collection of Name/Value pairs. The following raw HTTP response is converted;
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Length: 240
Content-Type: application/json; charset=utf-8
Server: nginx
ETag: W/"f0-EYtfNu+sVmscSzVVghi5p8EfJsA"
Vary: Accept-Encoding
Access-Control-Allow-Methods: GET, POST
Access-Control-Allow-Headers: content-type
Access-Control-Allow-Credentials: true
Strict-Transport-Security: max-age=31536000
Date: Thu, 16 Apr 2020 01:08:29 GMT
Connection: close
{
  "args":{
    "foo1":"bar1",
    "foo2":"bar2"
  },
  "headers":{
    "x-forwarded-proto":"https",
    "host":"postman-echo.com",
    "accept-encoding":"identity",
    "content-type":"text/xml",
    "x-forwarded-port":"80"
  },
  "url":"https://postman-echo.com/get?foo1=bar1&foo2=bar2"
}

Most items are self-explanatory - See HttpPOST(String, String, String, String, String) for details. Note. HTTP Content-Length header item in request will automatically be added (or updated if already in HeaderList)

See Also

Reference

HTTPBased Class
HttpGET Overload
TeamControlium.NonGUI Namespace

Clone this wiki locally