Sets the service authentication credentials. If no credentials are set, GoogleCredentials#getApplicationDefault() will be used to attempt getting credentials from
the environment. Use NoCredentials#getInstance() to skip authentication, this is
typically useful when using local service emulators.
Parameter
Name
Description
credentials
com.google.auth.Credentials
authentication credentials, should not be null
Returns
Type
Description
B
the builder
setHeaderProvider(HeaderProvider headerProvider)
public B setHeaderProvider(HeaderProvider headerProvider)
Sets the static header provider. The header provider will be called during client
construction only once. The headers returned by the provider will be cached and supplied as
is for each request issued by the constructed client. Some reserved headers can be overridden
(e.g. Content-Type) or merged with the default value (e.g. User-Agent) by the underlying
transport layer.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-30 UTC."],[],[]]