HttpJsonCallContext encapsulates context data used to make an http-json call.
HttpJsonCallContext is immutable in the sense that none of its methods modifies the HttpJsonCallContext itself or the underlying data. Methods of the form withX return copies of the object, but with one field changed. The immutability and thread safety of the arguments solely depends on the arguments themselves.
Validate the Universe Domain to ensure that the user configured Universe Domain and the Credentials' Universe Domain match. An exception will be raised if there are any issues when trying to validate (i.e. unable to access the universe domain).
Setting a non-empty set of retryable codes for an RPC that is not already retryable by default, will not have any effect and the RPC will NOT be retried. This option can only be used to change which codes are considered retryable for an RPC that already has at least one retryable code in its default settings.
Returns a new ApiCallContext with the given timeout set.
This sets the maximum amount of time a single unary RPC attempt can take. If retries are enabled, then this can take much longer, as each RPC attempt will have the same constant timeout. Unlike a deadline, timeouts are relative durations that are measure from the beginning of each RPC attempt. Please note that this limits the duration of a server RPC as well.
[[["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 2025-04-17 UTC."],[[["This page details the `HttpJsonCallContext` class, which is used to manage context data for HTTP/JSON calls and is immutable."],["`HttpJsonCallContext` offers methods to create instances, such as `createDefault()` for an empty instance and `of()` to use specific `HttpJsonChannel` and `HttpJsonCallOptions`."],["The class allows modification of call context through `withX` methods, which create a new `ApiCallContext` with the change while leaving the original instance untouched, and it has methods to retrieve values, like `getChannel()` and `getCallOptions()`."],["It provides methods to handle various settings such as retry behavior (`withRetrySettings`, `withRetryableCodes`), timeouts (`withTimeoutDuration`, `withStreamIdleTimeoutDuration`, `withStreamWaitTimeoutDuration`), and extra headers (`withExtraHeaders`)."],["The document contains a list of many previous versions, from 2.63.1 (latest) to 2.7.1, along with links to view documentation for each of them."]]],[]]