diff --git a/.changeset/shy-coats-exist.md b/.changeset/shy-coats-exist.md new file mode 100644 index 0000000000000..ea91b6852e290 --- /dev/null +++ b/.changeset/shy-coats-exist.md @@ -0,0 +1,5 @@ +--- +'@mysten/sui': minor +--- + +Adding back 'Client-Request-Method' header diff --git a/sdk/typescript/src/client/http-transport.ts b/sdk/typescript/src/client/http-transport.ts index 54309646ea1a4..b690316dbcfbe 100644 --- a/sdk/typescript/src/client/http-transport.ts +++ b/sdk/typescript/src/client/http-transport.ts @@ -95,6 +95,7 @@ export class SuiHTTPTransport implements SuiTransport { 'Client-Sdk-Type': 'typescript', 'Client-Sdk-Version': PACKAGE_VERSION, 'Client-Target-Api-Version': TARGETED_RPC_VERSION, + 'Client-Request-Method': input.method, ...this.#options.rpc?.headers, }, body: JSON.stringify({ diff --git a/sdk/typescript/test/unit/client/http-transport.test.ts b/sdk/typescript/test/unit/client/http-transport.test.ts index a5466164edbb1..cd3e54692be70 100644 --- a/sdk/typescript/test/unit/client/http-transport.test.ts +++ b/sdk/typescript/test/unit/client/http-transport.test.ts @@ -62,7 +62,7 @@ describe('SuiHTTPTransport', () => { 'Client-Sdk-Type': 'typescript', 'Client-Sdk-Version': PACKAGE_VERSION, 'Client-Target-Api-Version': TARGETED_RPC_VERSION, - // 'Client-Request-Method': 'getAllBalances', + 'Client-Request-Method': 'getAllBalances', }, method: 'POST', });