Class HttpEndpoint
This class represents an editable http endpoint, where updates on the request part may be made without changing the base URL.
Inheritance
Namespace: TeleScope.Connectors.Http.Abstractions
Assembly: TeleScope.Connectors.Http.Abstractions.dll
Syntax
public class HttpEndpoint : object
Constructors
| Improve this Doc View SourceHttpEndpoint(String, String, HttpMethod)
Sets the properties Address and Method with the given parameters.
The Address is separated by the two parameters baseAddress and request.
Declaration
public HttpEndpoint(string baseAddress, string request, HttpMethod method)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseAddress | The base address of the http endpoint. |
| System.String | request | The request part of the http endpoint. |
| HttpMethod | method | The http method. |
HttpEndpoint(Uri)
The default constructor sets the property Address with the given parameter and
uses the http method GET as MethodType.
Declaration
public HttpEndpoint(Uri address)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | address | The full adress of the http endpoint. |
HttpEndpoint(Uri, HttpMethod)
Sets the properties Address and MethodType with the given parameters.
Declaration
public HttpEndpoint(Uri address, HttpMethod method)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | address | The full adress of the http endpoint. |
| HttpMethod | method | The http method. |
Properties
| Improve this Doc View SourceAddress
Gets the complete Url that has the base address and request part.
Declaration
public Uri Address { get; protected set; }
Property Value
| Type | Description |
|---|---|
| Uri |
Method
Gets the http method is used by the endpoint.
Declaration
public HttpMethod Method { get; protected set; }
Property Value
| Type | Description |
|---|---|
| HttpMethod |
Methods
| Improve this Doc View SourceSetMethodType(HttpMethod)
This method may be overridden and updates the http method of the http endpoint. The Address property will not change.
Declaration
public virtual HttpEndpoint SetMethodType(HttpMethod method)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpMethod | method | The http method. |
Returns
| Type | Description |
|---|---|
| HttpEndpoint |
SetRequest(String)
This method may be overridden and updates the request part of the http endpoint. The base url will not change.
Declaration
public virtual HttpEndpoint SetRequest(string request)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | request | The request part of the http endpoint. |
Returns
| Type | Description |
|---|---|
| HttpEndpoint | The calling instance. |
ToString()
Overrides the ToString method and returns the method type and the absolute url of the http endpoint.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |