This builder should not be constructed directly. Call mockNode.forGet(cid)
instead.
Close the connection immediately after receiving the matching request, without sending any response.
This method completes the rule definition, and returns a promise that resolves to a MockedIPFSEndpoint once the rule is active. This endpoint can be used to query the rule, and check what requests were received for this content.
Return a successful result, returning the the raw content provided here as if it came instantly from IPFS.
This method completes the rule definition, and returns a promise that resolves to a MockedIPFSEndpoint once the rule is active. This endpoint can be used to query the rule, and check what requests were received for this content.
Timeout, accepting the request but never returning a response.
This method completes the rule definition, and returns a promise that resolves to a MockedIPFSEndpoint once the rule is active. This endpoint can be used to query the rule, and check what requests were received for this content.
Generated using TypeDoc
A builder to allow defining rules that will mock IPFS get requests.