C# Class IBM.Cloudant.Client.BasicAuthenticationInterceptor

Sample interceptor implementation that adds basic authentication to HTTP requests. It does this by adding an Authentication header with Basic authentication using the provided username and password.
This class is used for adding basic authentication to HTTP requests.
Inheritance: IHttpConnectionRequestInterceptor, IHttpConnectionResponseInterceptor
Exibir arquivo Open project: cloudant/xamarin-cloudant Class Usage Examples

Public Methods

Method Description
BasicAuthenticationInterceptor ( string username, string password ) : System

Initializes a new instance of the IBM.Cloudant.Client.BasicAuthenticationInterceptor class with the specified username and password.

InterceptRequest ( HttpConnectionInterceptorContext context ) : HttpConnectionInterceptorContext

Intercepts the HttpRequest before it is sent.

InterceptResponse ( HttpConnectionInterceptorContext context ) : HttpConnectionInterceptorContext

Intercepts the HttpResponse before it is consumed.

Method Details

BasicAuthenticationInterceptor() public method

Initializes a new instance of the IBM.Cloudant.Client.BasicAuthenticationInterceptor class with the specified username and password.
public BasicAuthenticationInterceptor ( string username, string password ) : System
username string Username for the http request.
password string Password for the user specified by username.
return System

InterceptRequest() public method

Intercepts the HttpRequest before it is sent.
public InterceptRequest ( HttpConnectionInterceptorContext context ) : HttpConnectionInterceptorContext
context HttpConnectionInterceptorContext Http connection interceptor context with the current state.
return HttpConnectionInterceptorContext

InterceptResponse() public method

Intercepts the HttpResponse before it is consumed.
public InterceptResponse ( HttpConnectionInterceptorContext context ) : HttpConnectionInterceptorContext
context HttpConnectionInterceptorContext Http connection interceptor context with the current state.
return HttpConnectionInterceptorContext