Actions
action #64496
closedjob_templates_scheduling API always returns YAML, even if client requests JSON
Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2020-03-13
Due date:
% Done:
0%
Estimated time:
Description
If you send a GET request to the /job_templates_scheduling endpoint, what you get back is always YAML, even if you specifically request JSON:
[adamw@adam openQA (master %)]$ http --json get https://openqa.fedoraproject.org/api/v1/job_templates_scheduling/1
HTTP/1.1 200 OK
...
Content-Type: text/yaml;charset=UTF-8
...
defaults:
arm:
machine: ARM
priority: 50
x86_64:
machine: 64bit
priority: 50
Per the docs, with http --json
"The Content-Type and Accept headers are set to application/json (if not specified)."
A server should not really return YAML when the client states that it accepts (only) JSON, I don't think. It's also somewhat surprising behaviour in general for an API that has always returned JSON for everything to suddenly start returning YAML for some specific thing.
Updated by tinita almost 5 years ago
- Status changed from New to In Progress
- Assignee set to tinita
Updated by tinita almost 5 years ago
- Status changed from In Progress to Feedback
Updated by tinita over 4 years ago
- Status changed from Feedback to Resolved
Guess it can be resolved then.
Actions