expect(method, url, [data], [headers], [keys]);
Creates a new request expectation.
Parameters
Param Type Details method string HTTP method. url stringRegExpfunction(string) HTTP url or function that receives a url and returns true if the url matches the current definition. data (optional) stringRegExpfunction(string)Object HTTP request body or function that receives data string and returns true if the data is as expected, or Object if request body is in JSON format. headers