diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-14 02:12:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-14 02:12:37 +0800 |
commit | e2438330f588eba03d50c18943b24d6e7f9e9479 (patch) | |
tree | 33ba5ae3919d67c6a5faa7b0ed07249fa5b8d694 /packages/website/ts/utils/doc_utils.ts | |
parent | 9b387b8ec3c543b5c96d1887550797a2bb90fe94 (diff) | |
parent | 2f0a9148387b66d75b9ee3856e68f0ed3aa149de (diff) | |
download | dexon-0x-contracts-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.gz dexon-0x-contracts-e2438330f588eba03d50c18943b24d6e7f9e9479.tar.zst dexon-0x-contracts-e2438330f588eba03d50c18943b24d6e7f9e9479.zip |
Merge pull request #874 from 0xProject/fix/request-timeout-issue
Fix Fetch Timeout Issue
Diffstat (limited to 'packages/website/ts/utils/doc_utils.ts')
-rw-r--r-- | packages/website/ts/utils/doc_utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts index 7768835fb..1627b9b0c 100644 --- a/packages/website/ts/utils/doc_utils.ts +++ b/packages/website/ts/utils/doc_utils.ts @@ -1,5 +1,5 @@ import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs'; -import { logUtils } from '@0xproject/utils'; +import { fetchAsync, logUtils } from '@0xproject/utils'; import findVersions = require('find-versions'); import * as _ from 'lodash'; import { S3FileObject, VersionToFilePath } from 'ts/types'; @@ -16,7 +16,7 @@ export const docUtils = { return versionToFilePath; }, async getVersionFileNamesAsync(s3DocJsonRoot: string, folderName: string): Promise<string[]> { - const response = await fetch(s3DocJsonRoot); + const response = await fetchAsync(s3DocJsonRoot); if (response.status !== 200) { // TODO: Show the user an error message when the docs fail to load const errMsg = await response.text(); @@ -73,7 +73,7 @@ export const docUtils = { }, async getJSONDocFileAsync(filePath: string, s3DocJsonRoot: string): Promise<TypeDocNode | DoxityDocObj> { const endpoint = `${s3DocJsonRoot}/${filePath}`; - const response = await fetch(endpoint); + const response = await fetchAsync(endpoint); if (response.status !== 200) { // TODO: Show the user an error message when the docs fail to load const errMsg = await response.text(); |