I am building an API platform.I have already ensured that the platform always returns JSON responses.My question is Should my API platform enforce the rule that all requests must be JSON? What are the benefits of making all requests to be JSON?I understand the benefits of making all responses to be JSON as this means consistency for the client apps using the API.I fail to see the benefits of making all requests to be JSON as well.I am asking this because GitHub API v3 appears to be enforcing this rule.My API platform will involve uploading of files in the requests. As far as I know, JSON requests does not work well with file uploads.Or do I do a hybrid?Enforce that anything NOT to do with file upload should send their requests as JSON?And allow an exception for file upload?
Should an API platform enforce only receiving JSON requests?
api;api design;json