Skip to content

Commit b6ecb90

Browse files
Add Custom User-Agent Header Support (#4)
* Add Custom User-Agent Header Support * Update Readme * Remove spaces
1 parent 181b5a6 commit b6ecb90

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This documentation is for the new Mollie's SDK. You can find more details on how
2828
* [SDK Example Usage](#sdk-example-usage)
2929
* [Authentication](#authentication)
3030
* [Idempotency Key](#idempotency-key)
31+
* [Add Custom User-Agent Header](#add-custom-user-agent-header)
3132
* [Available Resources and Operations](#available-resources-and-operations)
3233
* [Retries](#retries)
3334
* [Error Handling](#error-handling)
@@ -242,6 +243,24 @@ print("Payments are the same" if payment1.id == payment2.id else "Payments are d
242243
```
243244
<!-- End Idempotency Key -->
244245

246+
<!-- Start Add Custom User-Agent Header -->
247+
248+
## Add Custom User-Agent Header
249+
The SDK allows you to append a custom suffix to the `User-Agent` header for all requests. This can be used to identify
250+
your application or integration when interacting with the API, making it easier to track usage or debug requests. The suffix is automatically added to the default User-Agent string generated by the SDK. You can add it when creating the
251+
client:
252+
253+
```py
254+
client = ClientSDK(
255+
security = Security(
256+
api_key = os.getenv("CLIENT_API_KEY", "test_..."),
257+
),
258+
custom_user_agent = "insert something here"
259+
)
260+
```
261+
262+
<!-- End Add Custom User-Agent Header -->
263+
245264
<!-- Start Available Resources and Operations [operations] -->
246265
## Available Resources and Operations
247266

@@ -723,4 +742,4 @@ looking for the latest version.
723742
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
724743
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
725744

726-
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=mollie-api-python-beta&utm_campaign=python)
745+
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=mollie-api-python-beta&utm_campaign=python)

0 commit comments

Comments
 (0)