Fetch.withoutPayment
Skip automatic payment
Returns request options that disable automatic payments, including through identity-wrapped fetch clients.
Usage
import { , } from 'mppx/client'
const = .({ : [.()] })
const = await (
'https://api.example.com/resource',
.({ : 'GET' }),
)
.(.)
402 (when the resource requires payment)Use this for requests that must never pay a Challenge automatically. Email OTP send and verify requests apply it internally.
Custom forwarding fetch layers must preserve the returned options' symbol properties. Forward the original options or copy them with object spread; copying only named properties loses the opt-out.
Return type
type ReturnType = RequestInitA copy of init with the per-request payment opt-out symbol set. The original object isn't mutated.
Parameters
init (optional)
- Type:
RequestInit - Default:
{}
Fetch request options to copy.