Example: Basic Mock

The simplest way to use Mimicrab is to create a static response for a specific endpoint. This is perfect for mocking health checks or simple welcome messages.

Configuration

FieldValue
MethodGET
Path/api/hello
Status200
HeadersContent-Type: text/plain
BodyHello from Mimicrab!

Testing

Use curl to verify the mock:

curl -i http://localhost:3000/api/hello

Expected Result

HTTP/1.1 200 OK
content-type: text/plain
content-length: 22

Hello from Mimicrab!