Merge pull request #3855 from wing328/ts_fetch_basepath_fix

[Typescript] fix typescript-fetch base path by removing ending slash
This commit is contained in:
wing328
2016-09-23 19:59:25 +08:00
committed by GitHub
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;