I have one webservice which can take multiple content-types in request
text/plain
application/json
Now, client can send any of them either json or text. I have two options available on server
- I can create separate apis for different content types
- I can parse request data and check if its json or text?
What is better approach here?Is there a design pattern suited for this need?
Aucun commentaire:
Enregistrer un commentaire