Is it somehow possible to check if a file exists, without actually downloading it?
I have this large (~ 40mb) file, for example:
http://mirrors.sohu.com/mysql/MySQL-6.0/MySQL-6.0.11-0.glibc23.src.rpm
This is not strictly related to ruby, but it would be nice if the sender could set the content length.
RestClient.get "http://mirrors.sohu.com/mysql/MySQL-6.0/MySQL-6.0.11-0.glibc23.src.rpm",
headers: {"Content-Length" => 100}
Try
RestClient.head. (See https://www.rfc-editor.org/rfc/rfc9110.html#name-head)RFC 9110 HTTP Semantics