AwkwardCoder
AwkwardCoder

Reputation: 25631

RESTful endpoint returning multiple different structures?

Looking at a third party API (HTTP) and it can return data (XML) in different structures (NOT different types - JSON, XML) depending on parameters supplied in the query string to an endpoint.

Is this a good idea for a RESTful service endpoint?

Upvotes: 0

Views: 484

Answers (1)

FrVaBe
FrVaBe

Reputation: 49341

It is also recommended to use the HTTP Accept Header to specify which representation is requested. Have a look at this discussion.

Upvotes: 1

Related Questions