-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client.RemoteAPIVersion: get the remote API version number
Newer versions of Terraform Cloud and Enterprise return the API version in an HTTP header on all API responses. This client implementation already always makes a pre-flight request to a special "ping" endpoint as part of its initialization anyway, previously to configure the rate limiting settings. To avoid additional requests and keep this relatively simple, we'll now also use that request to populate the remote API version number and thus make it available immediately to callers via the RemoteAPIVersion method.
- Loading branch information
1 parent
5bbc31f
commit 2faaed6
Showing
2 changed files
with
66 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters