1.7.0 • Published 6 months ago

@genee/fetch v1.7.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

@genee/fetch

Usage

import fetch from '@genee/fetch';

type UserData = {
    id: number;
    name: string;
};

(async () => {
    const user = await fetch<UserData>('path/to/user', {
        method: 'POST',
        body: {
            name: 'Doe John',
        },
        // timeout: 5000,   // default is 5000
        // json: true,      // default is true, return original text if json is false
        beforeRequest(url, init) {
        
        },
        customParser(r: Response, defaultParser: (r: Response) => any) {
            return defaultParser(r);
        },
    });
})();
1.6.2

10 months ago

1.7.0

6 months ago

1.6.1

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago