fix typescript-fetch base path by removing ending slash

This commit is contained in:
wing328 2016-09-23 19:12:40 +08:00
parent 9301db60e6
commit d1c1c9d08f
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ import * as assign from "core-js/library/fn/object/assign";
interface Dictionary<T> { [index: string]: T; }
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
const BASE_PATH = "{{basePath}}";
const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, '');
export interface FetchArgs {
url: string;

View File

@ -31,7 +31,7 @@ import * as assign from "core-js/library/fn/object/assign";
interface Dictionary<T> { [index: string]: T; }
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
const BASE_PATH = "http://petstore.swagger.io/v2";
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, '');
export interface FetchArgs {
url: string;

View File

@ -30,7 +30,7 @@ import * as isomorphicFetch from "isomorphic-fetch";
interface Dictionary<T> { [index: string]: T; }
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
const BASE_PATH = "http://petstore.swagger.io/v2";
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, '');
export interface FetchArgs {
url: string;

View File

@ -31,7 +31,7 @@ import * as assign from "core-js/library/fn/object/assign";
interface Dictionary<T> { [index: string]: T; }
export interface FetchAPI { (url: string, init?: any): Promise<any>; }
const BASE_PATH = "http://petstore.swagger.io/v2";
const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, '');
export interface FetchArgs {
url: string;