Feature request: Support XML output
pdumais opened this issue · 7 comments
I'm not 100% sure if this is RFC compliant but I think the logic would be valid:
Restconf could default to always return data with yang-data+json.
Unless the client sends "Accept: yang-data+xml" and nothing else. In this case, restconf would send the reply in xml.
bascically:
Client Accept Header | What restconf returns |
---|---|
yang-data+json | yang-data+json |
yang-data+json and yang-data+xml | yang-data+json |
yang-data+xml | yang-data+xml |
something else | 415 ? |
So the logic is only based on the Accept header and not on the Content-Type.
technically yes, but it would be better for us to continue to silently process it.
If I can have it my way, I would keep status quo until XML is supported. And I would say #32 would be more useful to start with.
No, the other issue I raised had a comment abput that but it was incorrect. #32 is about adding functionality to parse xml.
I created 2 requests: one to read, the other to write.
I just thought it was easier to divide the work in two. Since one item is about checking the contentType and acting on it. The other is about checking the Accept header.
If you prefer 1 single task, I'm good with it too It's your project :)
But I'm gonna explore how to parse XML on my side in the meantime.