You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatically give JSON response for /machine/<id>/ when using curl.
The view already accepts ?json=1 as a request parameter to force a JSON
response.
This commit extends that behaviour to additionally check the HTML Accept
header, such that text-only requests (curl) give a JSON result
automatically..
Finally, we use the machine __json__ method rather than adding name/id
manually, which gives us the full machine fields in the result.
Change-Id: I0214d23996b68ee1cb23dae55b6929b40f52ea0b
0 commit comments