agentic-x402 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/scripts/commands/pay.ts
CHANGED
|
@@ -59,7 +59,10 @@ Examples:
|
|
|
59
59
|
const initialResponse = await fetch(url, {
|
|
60
60
|
method,
|
|
61
61
|
body: body ? body : undefined,
|
|
62
|
-
headers:
|
|
62
|
+
headers: {
|
|
63
|
+
'Accept': 'application/json',
|
|
64
|
+
...(body ? { 'Content-Type': 'application/json' } : {}),
|
|
65
|
+
},
|
|
63
66
|
});
|
|
64
67
|
|
|
65
68
|
if (initialResponse.status !== 402) {
|
|
@@ -143,7 +146,10 @@ Examples:
|
|
|
143
146
|
const response = await client.fetchWithPayment(url, {
|
|
144
147
|
method,
|
|
145
148
|
body: body ? body : undefined,
|
|
146
|
-
headers:
|
|
149
|
+
headers: {
|
|
150
|
+
'Accept': 'application/json',
|
|
151
|
+
...(body ? { 'Content-Type': 'application/json' } : {}),
|
|
152
|
+
},
|
|
147
153
|
});
|
|
148
154
|
|
|
149
155
|
if (!response.ok) {
|