x402_fetch
Fetch a URL and handle x402 payment requirements by signing a Hedera USDC payment on 402 responses, then return the final response body with diagnostics.
Instructions
Fetch a URL that may be x402-gated. If the server returns 402, sign a Hedera USDC payment, retry with the payment header, and return the final response body. Includes diagnostic info in the response for debugging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to fetch (may be x402-gated) | |
| body | No | Request body, if any (raw string) | |
| method | No | HTTP method | GET |
| headers | No | Extra headers to send with the request |