No results for

Powered byAlgolia
⚠️ This is archived documentation for v0.32. Go to the latest version

del( url, [body], [params] )

suggest edits

Make a DELETE request.

ParameterTypeDescription
urlstringRequest URL (e.g. http://example.com).
body (optional, discouraged)string / object / ArrayBufferRequest body; objects will be x-www-form-urlencoded. This is discouraged, because sending a DELETE request with a body has no defined semantics and may cause some servers to reject it.
params (optional)objectParams object containing additional request parameters.

Returns

TypeDescription
ResponseHTTP Response object.

Example

import http from 'k6/http';
const url = 'https://httpbin.test.k6.io/delete';
export default function () {
let params = { headers: { 'X-MyHeader': 'k6test' } };
http.del(url, null, params);
}