<< Back to previous view |
![]() |
[QB-3826] [Restful][Json format] Content-Type format alway is 'application/json'
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | 11.0.26 |
Fix Version/s: | 11.0.31 |
Type: | Bug | Priority: | Major |
Reporter: | Bin Wu | Assigned To: | Robin Shen |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown | ||
Environment: | run 11.0.26 in docker image: openjdk:11-jdk |
Description |
we are glad to know QB support json format from v10
we try the json format result, but here catch a different behavior with XML format with default header, we will receive the 'Content-Type' is 'application/xml' or 'text/plain' But when we try the json header, just receive 'application/json' So the problem is access some 'text/plain' like 'rest/version' receive type also is 'application/json' |
Comments |
Comment by Robin Shen [ 18/Jan/22 10:30 AM ] |
This is expected. If call with header "Accept: application/json", QB will always try to send output in json format. |
Comment by Bin Wu [ 18/Jan/22 02:34 PM ] |
Try API:
/rest/builds/count?configuration_id=3325&from_date=2022-1-16&to_date=2022-1-18 with 'application/json' ======= <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 </title> </head> <body> <h2>HTTP ERROR: 500</h2> <p>Problem accessing /rest/builds/count. Reason: <pre> Server Error</pre></p> <hr /><i><small>Powered by Jetty://</small></i> </body> </html> without 'application/json' ====== 2 |
Comment by Robin Shen [ 18/Jan/22 11:47 PM ] |
Thanks for clarifying the issue. This is a bug and will be fixed soon. |