spring-framework / org.springframework.http.client.support / BasicAuthorizationInterceptor

BasicAuthorizationInterceptor

open class BasicAuthorizationInterceptor : ClientHttpRequestInterceptor

ClientHttpRequestInterceptor to apply a BASIC authorization header.

Author
Phillip Webb

Since
4.3.1

Constructors

<init>

BasicAuthorizationInterceptor(username: String, password: String)

Create a new interceptor which adds a BASIC authorization header for the given username and password.

Functions

intercept

open fun intercept(request: HttpRequest, body: ByteArray, execution: ClientHttpRequestExecution): ClientHttpResponse