Base URL
https://mockly.me

Returns all request headers sent by the client.

https://mockly.me/headers

Example Response

{
  "headers": {
    "user-agent": "curl/8.0",
    "accept": "*/*"
  }
}

Returns the client IP address and X-Forwarded-For header if present.

https://mockly.me/ip

Example Response

{
  "ip": "127.0.0.1",
  "forwarded_for": null
}

Returns the User-Agent string from the request.

https://mockly.me/user-agent

Example Response

{
  "user_agent": "Mozilla/5.0 ..."
}

Returns a compact summary of the incoming request for debugging.

https://mockly.me/request-summary

Parameters

NameTypeDescription
include_headersbooleanQuery param — include full headers object

Example Response

{
  "method": "GET",
  "path": "/request-summary",
  "query_params": {},
  "ip": "127.0.0.1",
  "user_agent": "curl/8.0",
  "header_count": 5,
  "timestamp_utc": "2026-01-01T12:00:00Z"
}

Echoes back query parameters and request headers.

https://mockly.me/echo?foo=bar

Example Response

{
  "method": "GET",
  "params": {
    "foo": "bar"
  },
  "body": null,
  "headers": {}
}

Echoes back JSON body, query parameters, and headers.

https://mockly.me/echo

Example Response

{
  "method": "POST",
  "params": {},
  "body": {
    "message": "hello"
  },
  "headers": {}
}

Redirects to the given URL (adds https:// if no scheme provided).

https://mockly.me/redirect/example.com

Parameters

NameTypeDescription
urlstringPath — destination URL

Example Response

302 Redirect

Sets a sample cookie on the response for testing cookie handling.

https://mockly.me/set-cookie

Example Response

{
  "message": "Cookie has been set",
  "cookie_name": "example_cookie"
}