Skip to content

Commit 23a1f29

Browse files
committed
Add cookie jar support and dynamic rate limiting
1 parent c65ea20 commit 23a1f29

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ This client leverages API-specific SDKs to provide a comprehensive and consisten
1818
- **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.
1919
- **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.
2020

21+
- **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.
22+
2123
## API Handler
2224

2325
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.
@@ -86,6 +88,10 @@ Example configuration file (clientconfig.json):
8688
"LogOutputFormat": "console", // "console" / "json"
8789
"LogConsoleSeparator": " ", // " " / "\t" / "," / etc.
8890
"HideSensitiveData": true, // true / false
91+
"EnableDynamicRateLimiting": true, // true / false
92+
"MaxRetryAttempts": 5,
93+
"MaxConcurrentRequests": 3,
94+
"EnableCookieJar": true // true / false
8995
}
9096
}
9197
```

0 commit comments

Comments
 (0)