Skip to content

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Apr 23, 2024

This goes all the way back to #3246, and it's not clear why text/plain has been used throughout.

There seems to be a lack of specification of what the correct content-type is, but application/json seems correct and popular, and text/plain definitely isn't.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 23, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK laanwj, ryanofsky

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #27101 (Support JSON-RPC 2.0 when requested by client by pinheadmz)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.

Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.

Leave a comment here, if you need help tracking down a confusing failure.

Debug: https://github.com/bitcoin/bitcoin/runs/24176571360

@laanwj
Copy link
Member

laanwj commented Apr 24, 2024

IIRC we do return application/json content type, so this at least makes it symmetric. id be against enforcing this (because so many clients already specify it wrong), but the example would be better this way.

@luke-jr luke-jr force-pushed the jsonrpc_content_type branch from 3e908b1 to f90a84d Compare April 24, 2024 02:39
@fanquake fanquake changed the title Bugfix: JSON-RPC request Content-Type is application/json JSON-RPC request Content-Type is application/json Apr 24, 2024
@fanquake
Copy link
Member

Removed bugfix given this is a doc/test only change.

@laanwj
Copy link
Member

laanwj commented Apr 30, 2024

Code review ACK f90a84d

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@ryanofsky
Copy link
Contributor

Code review ACK f90a84d, but I think it would be helpful to change description to something like "doc: specify json content type in rpc examples" because the current description doesn't make it obvious that this is a documentation change, not a change in behavior.

PR also needs to be rebased since #27101 was just merged and it conflicts

@fanquake
Copy link
Member

Picked this up in #30215, given this is a very straightforward change, that just needed rebase and the commit message fixing.

@fanquake fanquake closed this May 31, 2024
Amygo777

This comment was marked as spam.

fanquake added a commit that referenced this pull request Jun 3, 2024
3c08e11 doc: JSON-RPC request Content-Type is application/json (Luke Dashjr)

Pull request description:

  Specify json content type in RPC examples.

  Picks up #29946. Which needed rebasing and the commit message fixing,

ACKs for top commit:
  laanwj:
    ACK 3c08e11
  tdb3:
    ACK for 3c08e11

Tree-SHA512: 770bbbc0fb324cb63628980b13583cabf02e75079851850170587fb6eca41a70b01dcedaf1926bb6488eb9816a3cc6616fe8cee8c4b7e09aa39b7df5834ca0ec
@bitcoin bitcoin locked and limited conversation to collaborators Jun 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants