palantir / conjure-typescript-runtime

An HTTP bridge library for use in front end applications and generated conjure code
Apache License 2.0
5 stars 13 forks source link

support binary response types in fetch bridge #171

Closed bavardage closed 9 months ago

bavardage commented 9 months ago

alt approach to https://github.com/palantir/conjure-typescript-runtime/pull/170/files

Before this PR

When trying to hit endpoints that return media (e.g. application/pdf, image/png) the current behaviour is to fall back to treating this as text (https://github.com/palantir/conjure-typescript-runtime/blob/790523e1ca558610a0366499c7ec31f35b7fa74f/packages/conjure-client/src/fetchBridge/fetchBridge.ts#L139)

Only responses served with Content-Type: application/octet-stream are unmangled.

After this PR

==COMMIT_MSG== Correctly return binary responses for a larger number of media content types (beyond application/octet-stream) ==COMMIT_MSG==

svc-autorelease commented 9 months ago

Released 2.10.0