camaraproject / WebRTC

Repository to describe, develop, document and test the WebRTC API family
Apache License 2.0
5 stars 8 forks source link

BYON call handling (VVOIP) PUT lacks 200 OK JSON response body #24

Closed deepakjaiswal1 closed 3 months ago

deepakjaiswal1 commented 9 months ago

@pradeepachar-mavenir @TEF-RicardoSerr Problem description The PUT method for BYON call handling does not return a JSON response body for successful requests (200 OK).

Expected behavior The PUT method for BYON call handling needs to be updated to return a JSON response body for successful requests (200 OK). This response body should include relevant information about the updated call handling configuration.

stroncoso-quobis commented 8 months ago

Fully agree, PUT should return the body modified. Not empty body.

But I will go further, if we are talking about to modify a specific parameter of the session, won't be better to use PATCH? Using PUT we should include all session information, not just the parameters to change. This will allow to expand the API on the future, but just a suggestion.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH

A PATCH request is considered a set of instructions on how to modify a resource. Contrast this with PUT; which is a complete representation of a resource.

TEF-RicardoSerr commented 8 months ago

Agree, to be fair, it would need to be added the 204 and 201 responses image

In fact I agree @stroncoso-quobis it could be done a PATCH regarding SDP parameter and the responses to this modifications could be the status. The way is currently done is quite messy and could be better to have multiple responses regarding status rather than multiple requests

TEF-RicardoSerr commented 3 months ago

This was fixed within last version of the API 0.1.2