Skip to content

@graphty/graphty-element / index / recordingFrom

Function: recordingFrom() ​

recordingFrom(request, response, options?): Promise<Recording>

Defined in: graph-io/dist/src/sources/testing.d.ts:92

A recording made from a real exchange, without its credential: the request's headers are never kept, query parameters named in secretQuery are removed from the URL, and of the response only the status, the Content-Type and the headers named in keepHeaders are kept. Experimental.

Parameters ​

request ​

Request

the request sent

response ​

Response

its response (read; pass a clone to keep using it)

options? ​

what to keep and drop

keepHeaders? ​

readonly string[]

response headers to keep beside Content-Type

secretQuery? ​

readonly string[]

query parameters removed from the URL

Returns ​

Promise<Recording>

the recording