Search code examples
httppostput

HTTP POST vs PUT large file transfer


I'm using HTTP requests(on the sender side) for a single large file transfer(20gb) and the receiving side is a remote system which just receives the file. Im coding in C++ on linux using libcurl on the sender side and mongoose webserver on the receiving side.Will there be actually be any difference in the performance(speed-wise maybe)?

I've read about this in a few places but I dont quite understand the exact difference so please if someone can explain it in simple words it would be really great. Thanks


Solution

  • There is no difference in performance, however if you are letting the user specify the path of the file, you should use PUT, and if you know where the file is going in the system, use POST for idomatic code. But no, there is no performance benefits of one over the other.