本文整理匯總了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);
}