fern-api / fern

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

feat(typescript): introduce API Promise so that we can return raw response headers #5218

Closed dsinghvi closed 1 day ago

dsinghvi commented 2 days ago

Added support for .asRaw() which allows users to access raw response data including headers. For example:

  const response = await client.someEndpoint().asRaw();
  console.log(response.headers['X-My-Header']); 
  console.log(response.body);
github-actions[bot] commented 2 days ago

🌿 Preview your docs: https://fern-preview-52229327-d0ff-4ee5-95aa-9791ecb9f5e9.docs.buildwithfern.com/learn