Feat Request: Allow more control over response type
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 768
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
When fetching data from static image, it might be nice to give users more control over the response type. For example:
import mbClient from "@mapbox/mapbox-sdk";
import StaticImage from "@mapbox/mapbox-sdk/services/static";
const client = mbClient({accessToken: "..."});
const staticImageService = StaticImage(client);
staticImageService.getStaticImage({ ... })
.send({ responseType: 'blob' })
.then(res => {
// do something with res
});
I poked around the code and didn't find any way to override the response type. I'm happy to send a PR for this. LMK 👍
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the static image service's getStaticImage entry point and the request handling behind send(). Trace how response types are currently selected, then check the surrounding service behavior before making a change. Done means callers can pass responseType, including 'blob', and receive the requested response type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100