review-board

Reviewboard API ignores request body


Have installed reviewboard 2.5.7.

If I create review request from commit using UI it works fine. If I using API it creates empty request and looks like ignore the JSON body at all.

POST http://myhost/api/review-requests/
Authorization: token bla-bla
Accept: application/json

{
"changenum": null,
"commit_id": "e235168b0f0528d006fa2872bf582896ae121909",
"create_from_commit_id": true,
"force_text_type": null,
"repository": "myrepo",
"submit_as": null
}

Does API really supports request from commit?


Solution

  • Got it: that api isn't supports JSON request. It should be application/x-www-form-urlencoded with form parameters.