本文整理汇总了TypeScript中urijs.toString函数的典型用法代码示例。如果您正苦于以下问题:TypeScript toString函数的具体用法?TypeScript toString怎么用?TypeScript toString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了toString函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: listNewsArticles
/**
* Lists news articles
* @summary Lists news articles
*/
public listNewsArticles():Promise<Array<NewsArticle>> {
const uri = new URI(`${this.basePath}/newsArticles`);
const options = {
method: "get",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${this.token}`
}
};
return fetch(uri.toString(), options).then((response) => {
return ApiUtils.handleResponse(response);
});
}
开发者ID:Metatavu,项目名称:pakkasmarja-spec,代码行数:18,代码来源:newsArticles.service.ts
示例2: findNewsArticle
/**
* Finds news article by id
* @summary Find news article
* @param newsArticleId news article id id
*/
public findNewsArticle(newsArticleId: number, ):Promise<NewsArticle> {
const uri = new URI(`${this.basePath}/newsArticles/${encodeURIComponent(String(newsArticleId))}`);
const options = {
method: "get",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${this.token}`
}
};
return fetch(uri.toString(), options).then((response) => {
return ApiUtils.handleResponse(response);
});
}
开发者ID:Metatavu,项目名称:pakkasmarja-spec,代码行数:19,代码来源:newsArticles.service.ts
示例3: findDeliveryPlace
/**
* Finds delivery place by id
* @summary Find delivery place
* @param id delivery place id
*/
public findDeliveryPlace(id: string, ):Promise<DeliveryPlace> {
const uri = new URI(`${this.basePath}/deliveryPlaces/${encodeURIComponent(String(id))}`);
const options = {
method: "get",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${this.token}`
}
};
return fetch(uri.toString(), options).then((response) => {
return ApiUtils.handleResponse(response);
});
}
开发者ID:Metatavu,项目名称:pakkasmarja-spec,代码行数:19,代码来源:deliveryPlaces.service.ts
示例4: createNewsArticle
/**
* Creates news article
* @summary Create news article
* @param body Payload
*/
public createNewsArticle(body: NewsArticle, ):Promise<NewsArticle> {
const uri = new URI(`${this.basePath}/newsArticles`);
const options = {
method: "post",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${this.token}`
},
body: JSON.stringify(body)
};
return fetch(uri.toString(), options).then((response) => {
return ApiUtils.handleResponse(response);
});
}
开发者ID:Metatavu,项目名称:pakkasmarja-spec,代码行数:20,代码来源:newsArticles.service.ts
注:本文中的urijs.toString函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论