Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into bug/website/txhash-error

This commit is contained in:
fragosti
2018-07-13 11:15:50 -07:00
62 changed files with 10537 additions and 10322 deletions

View File

@@ -1,4 +1,4 @@
import { logUtils } from '@0xproject/utils';
import { fetchAsync, logUtils } from '@0xproject/utils';
import * as _ from 'lodash';
import * as queryString from 'query-string';
@@ -18,14 +18,14 @@ export const fetchUtils = {
async requestAsync(baseUrl: string, path: string, queryParams?: object): Promise<any> {
const query = queryStringFromQueryParams(queryParams);
const url = `${baseUrl}${path}${query}`;
const response = await fetch(url);
const response = await fetchAsync(url);
logErrorIfPresent(response, url);
const result = await response.json();
return result;
},
async postAsync(baseUrl: string, path: string, body: object): Promise<Response> {
const url = `${baseUrl}${path}`;
const response = await fetch(url, {
const response = await fetchAsync(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',