Add HTTPRequest::head() function

This commit is contained in:
Philipp
2020-10-18 22:15:20 +02:00
parent bfbf8816e2
commit 61da51c2d5
4 changed files with 34 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ function parse_url_content(App $a)
// Check if the URL is an image, video or audio file. If so format
// the URL with the corresponding BBCode media tag
// Fetch the header of the URL
$curlResponse = DI::httpRequest()->get($url, ['novalidate' => true, 'nobody' => true]);
$curlResponse = DI::httpRequest()->head($url, ['novalidate' => true]);
if ($curlResponse->isSuccess()) {
// Convert the header fields into an array