This answer suggests that GET request does not support file uploads. Why is this?
So if the endpoint needs to have a file upload, then irrespective of whether it is a read endpoint or write endpoint, we should make it a POST?
This answer suggests that GET request does not support file uploads. Why is this?
So if the endpoint needs to have a file upload, then irrespective of whether it is a read endpoint or write endpoint, we should make it a POST?
GET
requests send data directly as the part of URL - like http://someapi.net/api?key=API_KEY
. There are limits in some browsers and web servers that how big an URL can be - and posting a whole file as the part of URL is fairly weird. Yes, you should use POST
.