File Explorer

/var/runtime/node_modules/@aws-sdk/node_modules/undici/docs/docs/api

This explorer reads the filesystem of the server it runs on, so /workspace/user isn't present here. Browsing and the terminal still work against this server's own disk from /.

MockCallHistoryLog.md1.7 KB · 44 lines
# Class: MockCallHistoryLog Access to an instance with : ```jsconst mockAgent = new MockAgent({ enableCallHistory: true })mockAgent.getCallHistory()?.firstCall()``` ## class properties - body `mockAgent.getCallHistory()?.firstCall()?.body`- headers `mockAgent.getCallHistory()?.firstCall()?.headers` an object- method `mockAgent.getCallHistory()?.firstCall()?.method` a string- fullUrl `mockAgent.getCallHistory()?.firstCall()?.fullUrl` a string containing the protocol, origin, path, query and hash- origin `mockAgent.getCallHistory()?.firstCall()?.origin` a string containing the protocol and the host- headers `mockAgent.getCallHistory()?.firstCall()?.headers` an object- path `mockAgent.getCallHistory()?.firstCall()?.path` a string always starting with `/`- searchParams `mockAgent.getCallHistory()?.firstCall()?.searchParams` an object- protocol `mockAgent.getCallHistory()?.firstCall()?.protocol` a string (`https:`)- host `mockAgent.getCallHistory()?.firstCall()?.host` a string- port `mockAgent.getCallHistory()?.firstCall()?.port` an empty string or a string containing numbers- hash `mockAgent.getCallHistory()?.firstCall()?.hash` an empty string or a string starting with `#` ## class methods ### toMap Returns a Map instance ```jsmockAgent.getCallHistory()?.firstCall()?.toMap()?.get('hash')// #hash``` ### toString Returns a string computed with any class property name and value pair ```jsmockAgent.getCallHistory()?.firstCall()?.toString()// protocol->https:|host->localhost:4000|port->4000|origin->https://localhost:4000|path->/endpoint|hash->#here|searchParams->{"query":"value"}|fullUrl->https://localhost:4000/endpoint?query=value#here|method->PUT|body->"{ "data": "hello" }"|headers->{"content-type":"application/json"}```