MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
6.28k stars 11.22k forks source link

adding back Client-Request-Method to sdk reqs #20337

Closed johnjmartin closed 1 week ago

johnjmartin commented 1 week ago

Description

Re-merging https://github.com/MystenLabs/sui/pull/20071, as an optimization to skip parsing jsonrpc request bodies when Client-Request-Method is set

This shouldn't cause any issues now that https://github.com/MystenLabs/sui/pull/20160 is merged and is running on testnet and mainnet (via https://github.com/MystenLabs/sui/tree/releases/sui-v1.38.0-release & https://github.com/MystenLabs/sui/tree/releases/sui-v1.37.0-release branches)

Test plan

Tested via pnpm create @mysten/dapp --template react-client-dapp (ref https://github.com/MystenLabs/sui/issues/20158) and:

curl -v 'https://fullnode.testnet.sui.io/' -X OPTIONS
* Host fullnode.testnet.sui.io:443 was resolved.
[...]
* Request completely sent off
< HTTP/2 200
< access-control-allow-origin: *
< vary: origin, access-control-request-method, access-control-request-headers
< access-control-allow-methods: POST
< access-control-allow-headers: content-type,client-sdk-type,client-sdk-version,client-target-api-version,app-name,client-request-method

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
multisig-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:40pm
sui-kiosk ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:40pm
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 11:40pm