No results for

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

get( url, [params] )

suggest edits

Make a GET request.

ParameterTypeDescription
urlstringRequest URL (e.g. http://example.com).
params (optional)objectParams object containing additional request parameters.

Returns

TypeDescription
ResponseHTTP Response object.

Example fetching a URL

import http from 'k6/http';
export default function () {
let res = http.get('https://k6.io');
console.log(JSON.stringify(res.headers));
}