Skip to content

fix(api): optimize API call compatibility - #5504

Merged
jwrct merged 2 commits into
tronprotocol:release_v4.7.3from
lxcmyf:release_v4.7.3
Sep 20, 2023
Merged

jwrct merged 2 commits into
tronprotocol:release_v4.7.3from
lxcmyf:release_v4.7.3

Conversation

@lxcmyf

@lxcmyf lxcmyf commented Sep 19, 2023 •

Copy link
Copy Markdown
Collaborator

What does this PR do?
When calling the HTTP interface through curl, if the contentType is not specified, its default value is "application/x-www form urlencoded". for example:
curl - X POST ' http://localhost:8090/wallet/getblockbynum '-- data' {"num": 0} '
In this case, JSON format data should not be passed in. However, to ensure compatibility with historical interface calls, calling through JSON format is now supported in this case.

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@jwrct
jwrct merged commit 3e6eb02 into tronprotocol:release_v4.7.3 Sep 20, 2023
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.3 milestone Sep 21, 2023
@halibobo1205 halibobo1205 added the topic:api rpc/http related issue label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic:api rpc/http related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants