cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc-Aurèle Brothier <ma...@exoscale.ch>
Subject Re: Default API response type: XML -> JSON
Date Tue, 24 Apr 2018 10:12:01 GMT
Hi Martin,

The response format does not come from the "accept" header but from the
request parameter "response", see the documentation:
http://docs.cloudstack.apache.org/en/latest/dev.html#response-formats-xml-and-json.
So your code works with the default mode. Can you quickly add
"response=xml" to all your queries?

Cheers
Marc-Aurèle

On Tue, Apr 24, 2018 at 11:27 AM, Martin Emrich <martin.emrich@empolis.com>
wrote:

> Hi!
>
> Am 23.04.18 um 15:34 schrieb Marc-Aurèle Brothier:
>
>> Hi everyone,
>>
>> I thought it would be good to move from XML to JSON by default in the
>> response of the API if no response type is sent to the server along with
>> the request. I'm wondering that's the opinion of people on the mailing
>> list.
>>
>> Would it still respond with XML as before if the requests contains an
> "Accept: text/xml" header?
> Otherwise it would break stuff for me...
>
> Cheers,
>
> Martin
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message