Skip to content

Commit 0b57be1

Browse files
authored
fix: openrpc requests always send application/json header (#2664)
1 parent a9ce64d commit 0b57be1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/fdr-sdk/src/api-definition/snippets/SnippetHttpRequest.ts

+5
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ export function toSnippetHttpRequest(
120120
}
121121
}
122122

123+
// If endpoint is OpenRPC, ensure Content-Type is application/json
124+
if (endpoint.protocol?.type === "openrpc") {
125+
headers["Content-Type"] = "application/json";
126+
}
127+
123128
return {
124129
method: endpoint.method,
125130
url,

0 commit comments

Comments
 (0)