File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " json-fetch" ,
3
- "version" : " 9.0.5 " ,
3
+ "version" : " 9.0.6 " ,
4
4
"description" : " A wrapper around ES6 fetch to simplify interacting with JSON APIs." ,
5
5
"author" :
" Good Eggs <[email protected] >" ,
6
6
"contributors" : [
Original file line number Diff line number Diff line change 1
1
import 'isomorphic-fetch' ;
2
+
3
+ import { Agent } from 'http' ;
2
4
import promiseRetry from 'promise-retry' ;
3
5
4
6
import getRequestOptions from './get_request_options' ;
5
7
6
8
export type ShouldRetry = ( responseOrError : Response | Error ) => boolean ;
7
9
8
10
export interface JsonFetchOptions extends Omit < RequestInit , 'body' > {
11
+ // node-fetch extensions (not available in browsers, i.e. whatwg-fetch) –
12
+ // see https://github.com/node-fetch/node-fetch/blob/8721d79208ad52c44fffb4b5b5cfa13b936022c3/%40types/index.d.ts#L76:
13
+ agent ?: Agent | ( ( parsedUrl : URL ) => Agent ) ;
14
+
15
+ // goodeggs-fetch options:
9
16
body ?: Record < string , unknown > ;
10
17
shouldRetry ?: ( responseOrError : Response | Error ) => boolean ;
11
18
retry ?: Parameters < typeof promiseRetry > [ 0 ] ;
You can’t perform that action at this time.
0 commit comments