Code Monkey home page Code Monkey logo

fetch's People

Contributors

tkrotoff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fetch's Issues

Rename HttpError to HTTPError?

Drop old browsers support

As of may 2022

All worldwide (https://gs.statcounter.com/browser-market-share):

  • EdgeHTML: 0.23%
  • IE: 0.64%

Desktop only worldwide (https://gs.statcounter.com/browser-market-share/desktop/worldwide/):

  • EdgeHTML: 0.55%
  • IE: 1.65%

As of october 2022

All worldwide (https://gs.statcounter.com/browser-market-share):

  • EdgeHTML: 0.05%
  • IE: 0.32%

Desktop only worldwide (https://gs.statcounter.com/browser-market-share/desktop/worldwide/):

  • EdgeHTML: 0.10%
  • IE: 0.80%

As of december 2022

All worldwide (https://gs.statcounter.com/browser-market-share):

  • EdgeHTML: 0.05%
  • IE: 0.28%

Desktop only worldwide (https://gs.statcounter.com/browser-market-share/desktop/worldwide/):

  • EdgeHTML: 0.10%
  • IE: 0.75%

As of february 2023

All worldwide (https://gs.statcounter.com/browser-market-share):

  • EdgeHTML: 0.04%
  • IE: 0.25%

Desktop only worldwide (https://gs.statcounter.com/browser-market-share/desktop/worldwide/):

  • EdgeHTML: 0.09%
  • IE: 0.65%

Ignore test files from the npm package

.npmignore with:

dist/cjs/Http.test.js
dist/Http.test.d.ts
dist/Http.test.js

does not work :/

npm publish --dry-run output:

=== Tarball Contents === 
npm notice 1.8kB  package.json          
npm notice 577B   CHANGELOG.md          
npm notice 1.1kB  LICENSE               
npm notice 619B   README.md             
npm notice 3.9kB  dist/cjs/Http.js      
npm notice 10.8kB dist/cjs/Http.test.js 
npm notice 467B   dist/cjs/HttpError.js 
npm notice 1.6kB  dist/cjs/HttpStatus.js
npm notice 272B   dist/cjs/index.js     
npm notice 686B   dist/Http.d.ts        
npm notice 3.6kB  dist/Http.js          
npm notice 11B    dist/Http.test.d.ts   
npm notice 9.9kB  dist/Http.test.js     
npm notice 126B   dist/HttpError.d.ts   
npm notice 366B   dist/HttpError.js     
npm notice 635B   dist/HttpStatus.d.ts  
npm notice 1.5kB  dist/HttpStatus.js    
npm notice 83B    dist/index.d.ts       
npm notice 83B    dist/index.js 

br encoded responses fails to be decoded

Hi:
I see this library sending this header to servers:
'accept-encoding': 'gzip, deflate, br'
and is a header I can't change by the fetch web standard protocol.
but then when the server response is brotli compressed (we accept br), the method
get(...).json()
fails, it seems that brotli uncompress is not supported by this library, or am I missing something?
thanks in advance

Export test utility function createHttpError()

export function createHttpError(statusText: string, status: HttpStatus, responseBody: object) {
  const error = new HttpError(statusText);
  error.status = status;
  error.response = responseBody;
  return error;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.