No results for

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

get( url, [params] )

Make a GET request.

ParameterTypeDescription
urlstring / HTTP URLRequest 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 () {
const res = http.get('https://k6.io');
console.log(JSON.stringify(res.headers));
}