Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Add expected User-Agent format to SDK docs #1222

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/docs/sdk/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ We recommend always sending the following headers:

- `content-type`
- `content-length`
- `user-agent`

The following additional headers are permitted as per CORS policy:

Expand All @@ -229,6 +230,24 @@ The following additional headers are permitted as per CORS policy:
- `content-encoding`
- `transfer-encoding`

### User Agent

All SDKs are expected to report their name and version via the `user-agent` header.
The following format should be used (unless required or recommended differently by the platform,
e.g. for browser SDKs):
kahest marked this conversation as resolved.
Show resolved Hide resolved

`{sdk-name}/{sdk-version}`
kahest marked this conversation as resolved.
Show resolved Hide resolved

Additional information about the runtime, operating system, and others can be
appended as comments in parentheses, like so:

`{sdk-name}/{sdk-version} ({runtime-name} {runtime-version}; {os-name} {os-version})`
kahest marked this conversation as resolved.
Show resolved Hide resolved

There is no expectation towards the presence or order of fields. The user agent
must not contain PII or otherwise sensitive data. In general it should not contain
any information that is not already present in the payload.


## Request Compression

SDKs are heavily encouraged to compress the request body before sending it to
Expand Down
Loading