{"repo":"infinitered/apisauce","free":true,"listed":false,"github":"https://github.com/infinitered/apisauce","clone":"git clone https://github.com/infinitered/apisauce.git","description":"Axios + standardized errors + request/response transforms.","language":"JavaScript","stars":2885,"topics":["axios","promise","api","react-native","reactjs"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Apisauce [!IMPORTANT] Community Support Only: Apisauce is no longer actively maintained, although Infinite Red will release security patches submitted by the community. We do not recommend using it on new projects. Instead, use Axios directly and build your own wrapper around it or look for another better-maintained wrapper. Talking to APIs doesn't have to be awkward anymore. Features - low-fat wrapper for the amazing axios http client library - all responses follow the same flow: success and failure alike - responses have a problem property to help guide exception flow - attach functions that get called each request - attach functions that change all request or response data - detects connection issues (on React Native) Installing npm i apisauce --save or yarn add apisauce - Depends on axios . - Compatible with ES5. - Built with TypeScript. - Supports Node, the browser, and React Native. Quick Start See the examples folder for more code. Documentation Create an API You create an api by calling .create() and passing in a configuration object. The only required property is baseURL and it should be the starting point for your API. It can contain a sub-path and a port as well. HTTP request headers for all requests can be included as well. Default timeouts can be applied too: You can also pass an already created axios instance Calling The API With your fresh api , you can now call it like this: get , head , delete , link and unlink accept 3 parameters: - url - the relative path t","default_branch":null,"files":null,"tree":[],"storefront":"/r/infinitered","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/infinitered/apisauce/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}