What is the HTTP request method for a web API that receives large files

Which http request method is suitable for receiving large files?

My use case: I want to provide an HTTP API:

  • Input: mp3 file. The whole file (not just the file name)
  • Conclusion: a list of possible music translators performing this song.

Since the data does not change on the server, I think that POSTit PUTdoes not fit.

AFAIK method is GETnot suitable:

  • The mp3 file is too large for the query string.
  • GET requests with body data are new to me.

What is the HTTP request method for a web API that receives large files?

Update

  • This is not a download. Mp3 is input, some text is output.

Update2

, HTTP API calculate_square_root(). 9, 3. "upload" 9? GET GET?

+4
3

, POST:

4.3.3. POST

POST ,   ,    . , POST    ( ):

  • , , HTML  , ; [...]

, Content-Type multipart/form-data.

+1

, , POST.

, "Content-Type" multipart/form-data.

+1

RFC: HTTP 1.1, , POST.

, POST, ...

, POST, , URI....

,...

, , ,

+1

Source: https://habr.com/ru/post/1650671/


All Articles