Class HttpBasicAuthenticator
- Namespace
- RestSharp.Authenticators
- Assembly
- RestSharp.dll
Allows "basic access authentication" for HTTP requests.
public class HttpBasicAuthenticator : AuthenticatorBase, IAuthenticator
- Inheritance
-
HttpBasicAuthenticator
- Implements
- Inherited Members
Remarks
Encoding can be specified depending on what your server expect (see https://stackoverflow.com/a/7243567). UTF-8 is used by default but some servers might expect ISO-8859-1 encoding.
Constructors
HttpBasicAuthenticator(string, string)
public HttpBasicAuthenticator(string username, string password)
Parameters
HttpBasicAuthenticator(string, string, Encoding)
public HttpBasicAuthenticator(string username, string password, Encoding encoding)
Parameters
Methods
GetAuthenticationParameter(string)
protected override ValueTask<Parameter> GetAuthenticationParameter(string accessToken)
Parameters
accessToken
string