The text was updated successfully, but these errors were encountered:
nadi-noda
changed the title
Could we add --xml or --json to add headers needed
Could we add --xml or --json to add headers needed to call rest api
Apr 8, 2020
Very often, those are not actually needed when using rest API even when sending/receiving XML or JSON. But sure, sometimes they are.
Setting Content-Type when doing a GET or any other method without a body would be a bit strange I think.
I think plain --xml and --json are maybe a bit too brief and generic. Maybe --http-json etc? Not sure.
I'm not totally convinced and I will probably not work on this myself any time soon.
Since this is a feature-request, this issue will be closed soon as this is a bug-tracker and this issue is not a bug. If you want to see this feature happen sooner rather than later, a good idea is to start working on it yourself and/or join the mailing list and gather input and interest from other users.
Could we add --xml or --json to add headers needed to call rest api
--xml must add ==> -H 'Content-Type: application/xml' -H "Accept: application/xml"
--json ==> -H 'Content-Type: application/json' -H "Accept: application/json"
Thanks
The text was updated successfully, but these errors were encountered: