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
Afficher le fichier Open project: cloudant/xamarin-cloudant Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat System

InterceptRequest() public méthode

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

InterceptResponse() public méthode

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