Skip to content

discussions Search Results · user:sindresorhus language:swift archived:false is:public language:JavaScript language:HTML

265 results  (168 ms)

265 results

insindresorhus (press backspace or delete to remove)
Some qualifiers in your query (language, archived) are not supported when searching discussions. Try searching for repositories instead?

What would you like to discuss? How do I force cache requests with hooks? I have tried this and it doesn t work. const instance = got.extend({ cache: new Map(), hooks: { afterResponse: [ ...

Hi, When I have a ky instance where the Content-Type header is, by default, set to application/json , will it automatically update the same header to multipart/form-data when I send formData in a request ...

I created a single instance of ky using ky.create const client = ky.create({ credentials: include , prefixUrl: process.env.NEXT_PUBLIC_API_BASE_URL, headers: { Content-Type : application/json ...

Hi, i have an API that support Streams and it responds chunks of data. It returns a big list as chunks, following JSONL format. fetchJSONLines below is a ts implementation to read from the API. It works ...

I m trying to migrate a project from got v11 to v14. I found, that typings works good on v12, but fully broken for me on v13 and v14. I see the error about any type, that is, the types simply cannot connect. ...

curlconverter can now rewrite curl commands into Got function calls. These curl arguments are supported: - --request (-X) - --get (-G) - --head - --header (except when it s a filename) - --user-agent ...

Hi, I am returning Pagination Metadata (Total records, page number, total pages) etc. from my API in a X-Pagination response header. My Vue.Js code is making a GET call to the API to get records and pagination ...

I m looking to create a ky instance that can accept additional arguments, which would be accessible in hooks. One approach I ve considered is extending the Options and NormalizedOptions interfaces. import ...

I may be a bit confused about how to explain it, I hope those who read this understand. in my case I m trying to fetch a refresh token on the afterResponse hook, and if the API doesn t return the token ...

(This is just a small side quest to satiate my curiosity and not a critical issue I need to solve or a problem with ky. I m basically just looking for ideas.) I m working on an application that triggers ...