fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.68k stars 150 forks source link

[Fern's Documentation] How to set user-agent string in generated SDKs #3453

Open Arkessler opened 6 months ago

Arkessler commented 6 months ago

What can be improved

I'm trying to figure out if it's currently possible to set a user-agent string in generated SDKs.

I found this Issue about it: https://github.com/fern-api/fern/issues/2264. Hard to tell from the history on that Issue whether support was added, and if it was I can't find "user-agent" anywhere in the docs.

If this is supported, could somebody advise on how to set it?

mstade commented 5 months ago

@dannysheridan you closed #2264 that this ticket references – any chance you can provide any guidance on this? Thank you! 🙏

dannysheridan commented 5 months ago

Howdy @Arkessler and @mstade! Sending a user-agent string (e.g., User-Agent: ${package}/${version}) is not currently supported.

Today Fern includes the following request headers for the same purpose:

"X-Fern-Language": "${language}",
"X-Fern-SDK-Name": "${package}",
"X-Fern-SDK-Version": "${version}",

A user of Fern has added a UserAgent themselves. If helpful, here's a link the PR: https://github.com/AssemblyAI/assemblyai-java-sdk/pull/105/files