Class RequestController
Network requests handler.
Inherited Members
Namespace: EduCATS.Networking
Assembly: EduCATS.dll
Syntax
public class RequestController
Constructors
RequestController(string, PlatformServices)
Constructor.
Declaration
public RequestController(string url = null, PlatformServices services = null)
Parameters
Type | Name | Description |
---|---|---|
string | url | URL. |
PlatformServices | services | Param |
Fields
_services
Declaration
public IPlatformServices _services
Field Value
Type | Description |
---|---|
IPlatformServices |
Properties
Uri
Uri.
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
Uri |
Url
URL.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
SendRequest(HttpMethod)
Send request.
Declaration
public Task<HttpResponseMessage> SendRequest(HttpMethod httpMethod)
Parameters
Type | Name | Description |
---|---|---|
HttpMethod | httpMethod |
|
Returns
Type | Description |
---|---|
Task<HttpResponseMessage> | Response. |
Remarks
GET
and POST
requests are supported only.
SetPostContent(string, Encoding, string)
Set POST
content.
Declaration
public void SetPostContent(string content, Encoding encoding, string mediaType)
Parameters
Type | Name | Description |
---|---|---|
string | content | Content. |
Encoding | encoding | Encoding. |
string | mediaType | Content type. |