本文整理汇总了TypeScript中superagent.del函数的典型用法代码示例。如果您正苦于以下问题:TypeScript del函数的具体用法?TypeScript del怎么用?TypeScript del使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了del函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should successfully delete a exsistent company", () => {
superAgent
.del("/api/companies/" + companyId + "/")
.end(function (
err : Object,
res : superAgent.Response
) : Chai.Assertion {
return Chai.expect(err).to.not.undefined;
});
});
示例2: request
request
.get('/search')
.end(callback);
request('GET', '/search')
.end(callback);
request
.get('http://example.com/search')
.end(callback);
request
.head('/favicon.ico')
.end(callback);
request
.del('/user/1')
.end(callback);
request
.delete('/user/1')
.end(callback);
request
.delete('/user/1')
.send()
.end(callback);
request('/search')
.end(callback);
// Setting header fields
示例3: delete
/**
* Builds a HTTP DELETE request for the provided `endpoint`.
*
* @hidden
* @param endpoint The endpoint URI, relative to this serverâs base URL. Must start with a `/`.
* @return A request object to `DELETE` on `endpoint`.
*/
public delete(endpoint: string): Http.Request {
return Http.del(this.baseUrl + endpoint);
}