You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-111Lines changed: 1 addition & 111 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,117 +20,7 @@ This HTTP client is intended to be used with targetted SDK's and terraform provi
20
20
-**API Handler Interface**: Provides a flexible and extensible way to interact with different APIs, including encoding and decoding requests and responses, managing authentication endpoints, and handling API-specific logic.
21
21
-**Configuration via JSON or Environment Variables**: The Go API HTTP Client supports configuration via JSON files or environment variables, providing flexibility in defining authentication credentials, API endpoints, logging settings, and other parameters.
22
22
23
-
-**Cookie Jar Support**: Incorporates an optional cookie jar to manage cookies effortlessly across requests, enhancing session management and statefulness with APIs that require cookie-based authentication or tracking. This feature allows for automatic storage and sending of cookies with subsequent requests, mirroring browser-like interaction with web services. It can be enabled or disabled based on configuration, providing flexibility in how stateful interactions are handled with the target API.
24
-
25
-
## API Handler
26
-
27
-
The `APIHandler` interface abstracts the functionality needed to interact with various APIs, making the HTTP client adaptable to different API implementations. It includes methods for constructing resource and authentication endpoints, marshaling requests, handling responses, and managing API-specific headers.
28
-
29
-
### Implementations
30
-
31
-
Currently, the HTTP client supports the following API handlers:
32
-
33
-
-**Jamf Pro**: Tailored for interacting with Jamf Pro's API, providing specialized methods for device management and configuration.
34
-
-**Microsoft Graph**: Designed for Microsoft Graph API, enabling access to various Microsoft 365 services.
35
-
36
-
## Getting Started
37
-
38
-
## HTTP Client Build Flow
39
-
40
-
The HTTP client build flow can be initiated using a number of methods. The primary methods include:
41
-
42
-
Using the SDK `BuildClientWithConfigFile` function, which reads the configuration from a JSON file and constructs the client accordingly. The configuration file specifies the authentication details, API environment settings, and client options, such as logging level, retry attempts, and concurrency limits.
43
-
44
-
Or using the SDK `BuildClientWithEnvironmentVariables` function, which reads the configuration from environment variables and constructs the client accordingly. This method allows for more flexible configuration management, particularly in containerized environments or when using orchestration tools.
45
-
46
-
There is also the option to the build the client manually by creating a new `Client` struct and setting the required fields directly. This method provides the most granular control over the client configuration and can be useful for advanced use cases or when integrating with existing configuration management systems. This is the approached used in related terraform providers.
0 commit comments