GuidesAPI Reference
API Reference

get mocks

returns all mocked requests.

import Mimic from 'mimic';

console.log(Mimic.mocks);

Output

[
  {
    "id": "4034db5e-34e1-401c-b023-49ec55cf3028",
    "active": true,
    "method": "GET",
    "url": "http://uinames.com/api/?amount=2&region=russia",
    "headers": {
      "accept": "*/*"
    },
    "response": {
      "delay": 659,
      "status": 500,
      "headers": {
        "pragma": "no-cache",
        "content-type": "application/json; charset=utf-8",
        "cache-control": "no-cache",
        "expires": -1
      },
      "body": "{\n  \"mocked\": true\n}"
    },
    "origin": "http://localhost:8080"
	}
]