fun takeRequest(): RecordedRequest!
Awaits the next HTTP request, removes it, and returns it. Callers should use this to verify the request was sent as intended. This method will block until the request is available, possibly forever.
Return
RecordedRequest!: the head of the request queue
fun takeRequest(timeout: Long, unit: TimeUnit!): RecordedRequest!
Awaits the next HTTP request (waiting up to the specified wait time if necessary), removes it, and returns it. Callers should use this to verify the request was sent as intended within the given time.
timeout - Long: how long to wait before giving up, in units of unit
unit - TimeUnit!: a TimeUnit determining how to interpret the timeout parameter
Return
RecordedRequest!: the head of the request queue