Skip to content

72120597 6fa2 1437 26de f3477e705880

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

HTTPBased Class

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

Provides test oriented functionality for interacting with HTTP based protocols

Inheritance Hierarchy

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

Syntax

C#

public class HTTPBased

The HTTPBased type exposes the following members.

Constructors

 

Name Description
Public method HTTPBased Initialises a new instance of the HTTPBased class. Used for testing an HTTP interface when used for Non-UI interaction (IE. WebServices,
JSON

etc...)

  Back to Top

Properties

 

Name Description
Public property Body Gets or sets the HTTP body
Public property CertificateValidationCallback Gets or sets Call-back delegate for custom/test-based validations of Server certificates. Can be used for Server Certificate logging, negative testing etc...
Public property ClientCertificate Gets or sets X509 Certificate to use with SSL based communications (If required)
Public property Domain Gets or sets the HTTP Domain
Public property HeaderList Gets or sets the HTTP Header as a List of name/value pairs
Public property HeaderString Gets or sets the HTTP Header as a string
Public property HTTPMethod Gets or sets the HTTP Method
Public property QueryList Gets or sets the HTTP Query list that is used on top line of HTTP Header
Public property QueryString Gets or sets the HTTP Query string that is used on top line of HTTP Header
Public property ResourcePath Gets or sets the HTTP Resource Path
Public property ResponseRaw Gets raw Response text of HTTP Request. Data is raw HTTP response.
Public property TryException Gets last exception thrown in a Try... method.
Public property UseSSL Gets or sets a value indicating whether a secure SSL (HTTPS) connection is to be used
  Back to Top

Methods

 

Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Http(HTTPBased.HTTPMethods, Boolean) Sends an HTTP Request with the given request method and set properties then returns response.
Public method Http(HTTPBased.HTTPMethods, String, String, String, String, String, Boolean) Sends an HTTP Request with the given request method and parameters
Public method HttpGET() Performs an HTTP GET to the required Domain/ResourcePath containing given HTTP Query-string Header and Body (if given)
Public method HttpGET(String, String, String, String, String) Performs an HTTP GET to the required Domain/ResourcePath containing given HTTP Query-string Header and Body (if given)
Public method HttpPOST() Performs an HTTP POST to the required Domain/ResourcePath containing given HTTP Header and Body
Public method HttpPOST(String, String, String, String, String) Performs an HTTP POST to the required Domain/ResourcePath containing given HTTP Header and Body
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method TryHttp(HTTPBased.HTTPMethods, HTTPBased.ItemList, Boolean) Sends an HTTP Request with the given request method and set properties then returns response.
Public method TryHttp(HTTPBased.HTTPMethods, String, String, String, String, String, HTTPBased.ItemList, Boolean) Sends an HTTP Request with the given request method and parameters
Public method TryHttpPOST(HTTPBased.ItemList) Performs an HTTP POST to the required Domain/ResourcePath containing given HTTP Header and Body
Public method TryHttpPOST(String, String, String, String, HTTPBased.ItemList) Performs an HTTP POST to the required Domain/ResourcePath containing given HTTP Header and Body
  Back to Top

Remarks

 

Category Item Type Default Value Comments
TeamControlium.HTTP SSLPort
int
```</td><td>443</td><td>Port used for SSL tunnelled HTTP (HTTPS) communication</td></tr><tr><td>TeamControlium.HTTP</td><td>HTTPPort</td><td>

int


## See Also


#### Reference
<a href="7c8197c9-2a4b-3073-068f-4bdf12fc0e2c">TeamControlium.NonGUI Namespace</a><br />
Clone this wiki locally