HTTP Load Testing

Test any HTTP endpoint under load

Send thousands of HTTP requests to any endpoint and measure response times, throughput, and error rates. Full support for all HTTP methods, custom headers, cookies, and request bodies.

What you get

  • All HTTP methods: GET, POST, PUT, DELETE, PATCH
  • Custom headers, cookies, and authentication
  • JSON, form-data, and binary payloads
  • Response validation with checks
  • Configurable think time between requests
  • Real-time metrics dashboard
http-test.js
import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = { vus: 50, duration: '3m' };

const BASE_URL = 'https://api.example.com';

export default function () {
  // GET request
  const list = http.get(`${BASE_URL}/items`);
  check(list, { 'list ok': (r) => r.status === 200 });

  // POST request with JSON body
  const created = http.post(`${BASE_URL}/items`, 
    JSON.stringify({ name: 'Test Item' }),
    { headers: { 'Content-Type': 'application/json' } }
  );
  check(created, { 'created': (r) => r.status === 201 });
  
  sleep(1);
}

Frequently Asked Questions

What HTTP methods are supported?

All standard methods — GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS. You can also send custom HTTP methods via k6's http.request() function.

Can I send JSON payloads?

Yes. Use JSON.stringify() for the body and set Content-Type to application/json. k6 handles serialization and content negotiation transparently.

How do I handle cookies and sessions?

k6 automatically manages cookies across requests within a VU iteration. You can also set custom cookies via the headers parameter or use k6's cookie jar API for fine-grained control.

Ready to start http load testing?

Sign up free — no credit card required. Get 200 VUs and 5 minute tests instantly.

loadtest.dev

© 2026 loadtest.dev