CallerT
- The return type of the terminating methods. Usually this is the type of the FluentHelperBasic
implementation that this helper was called on.public class FluentHelperCustomHttpHeader<CallerT> extends Object
FluentHelperBasic
named service
):
service.withCustomHttpHeader("Some Key", "Some Value").and("Another Key", "Another value").onRequestOnly().execute()
Modifier and Type | Method and Description |
---|---|
FluentHelperCustomHttpHeader<CallerT> |
and(String headerName,
String headerValue)
Add an additional custom header pair to be used as a custom header.
|
CallerT |
onRequestAndImplicitRequests()
Adds the given header/value pairs to all requests, so for example CSRF token and metadata fetches, as well as the
actual request to execute.
|
CallerT |
onRequestOnly()
Adds the given header/value pairs only to the actual request to execute.
|
@Nonnull public FluentHelperCustomHttpHeader<CallerT> and(@Nonnull String headerName, @Nullable String headerValue)
headerName
- The header name to add.headerValue
- The header value to add.@Nonnull public CallerT onRequestAndImplicitRequests()
Copyright © 2019 SAP SE. All rights reserved.