get capturedRequests
returns all the network requests Mimic captured.
import Mimic from 'mimic';
console.log(Mimic.capturedRequests);
Output
[
{
"id": "d539e560-6728-400c-8f26-e32aa5cf94a8",
"method": "POST",
"url": "http://localhost/api/login",
"params": "{\"user\":\"test\",\"password\":\"test\"}",
"headers": {
"Content-Type": "application/json; charset=utf-8",
"Accept": "application/json, text/javascript, */*; q=0.01"
},
"requestHash": "POST|http://localhost/api/login|{\"user\":\"test\",\"password\":\"test\"}",
"response": {
"status": 200,
"delay": 0,
"headers": {},
"body": ""
}
}
]