Interface IWebMClient

Provides additional features to the default SDK, specifically for HTTP and REST.

Namespace: StylelabsStylelabs.MSdkWebClient
Assembly: Stylelabs.M.Sdk.WebClient.dll
Syntax
RequestResponse
public interface IWebMClient : IMClient

Properties

Api

Gets contains functionality to get REST API information. It will also check for compatibility with the server REST API.

Declaration
RequestResponse
IApiClient Api { get; }
Property Value
TypeDescription
IApiClient

ImpersonatedUsername

Gets the name of the user being impersonated. This is null when impersonation is not active.

Declaration
RequestResponse
string ImpersonatedUsername { get; }
Property Value
TypeDescription
string

LinkHelper

Gets contains functionality to build and parse links.

Declaration
RequestResponse
ILinkHelper LinkHelper { get; }
Property Value
TypeDescription
ILinkHelper

Package

Gets contains functionality to import and export packages.

Declaration
RequestResponse
IPackageClient Package { get; }
Property Value
TypeDescription
IPackageClient

Raw

Gets contains functionality to do custom HTTP requests.

Declaration
RequestResponse
IRawClient Raw { get; }
Property Value
TypeDescription
IRawClient

Uploads

Gets contains functionality for file uploads.

Declaration
RequestResponse
IUploadClient Uploads { get; }
Property Value
TypeDescription
IUploadClient

Methods

SetDelegatingHandlerFactory(IDelegatingHandlerFactory)

Sets a factory that will be used to create a System.Net.Http.DelegatingHandler on the first request per specific protocol and host. The handler will be reused for the next requests.

Declaration
RequestResponse
void SetDelegatingHandlerFactory(IDelegatingHandlerFactory factory)
Parameters
TypeNameDescription
IDelegatingHandlerFactoryfactory

The http client factory.

SetHttpClientFactory(IHttpClientFactory)

Sets a factory that will be used to create a System.Net.Http.HttpClient on the first request per specific protocol and host. The client will be reused for the next requests.

Declaration
RequestResponse
void SetHttpClientFactory(IHttpClientFactory factory)
Parameters
TypeNameDescription
IHttpClientFactoryfactory

The http client factory.

SetKnownSSoRedirects(IEnumerable<Uri>)

Set known SSO redirect URls that must trigger security token refreshes.

Declaration
RequestResponse
void SetKnownSSoRedirects(IEnumerable<Uri> ssoRedirects)
Parameters
TypeNameDescription
IEnumerable<>UrissoRedirects

SSO URls.

TestConnectionAsync()

Tests the following things:

  • if the client can successfully connect to the server
  • if the SDK and server are compatible
  • if the credentials are correct This will throw exceptions if it failed to connect. The exception type depends on what failed.
Declaration
RequestResponse
Task TestConnectionAsync()
Returns
TypeDescription
Task

A representing the asynchronous operation.

Events

RefreshTokenReceived

Triggered when a new refresh-token has been received.

Declaration
RequestResponse
event EventHandler<RefreshTokenReceivedEventArgs> RefreshTokenReceived
Event Type
TypeDescription
EventHandler<>RefreshTokenReceivedEventArgs

RequestCreated

Triggered when a web-request has been created.

Declaration
RequestResponse
event EventHandler<RequestCreatedEventArgs> RequestCreated
Event Type
TypeDescription
EventHandler<>RequestCreatedEventArgs

Do you have some feedback for us?

If you have suggestions for improving this article,