Get url HEADers.
HEAD(url = NULL, config = list(), ..., handle = NULL)
| url | the url of the page to retrieve |
|---|---|
| config | Additional configuration settings such as http
authentication ( |
| ... | Further named parameters, such as |
| handle | The handle to use with this request. If not
supplied, will be retrieved and reused from the |
A response() object.
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.
The response to a HEAD request MAY be cacheable in the sense that the information contained in the response MAY be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache MUST treat the cache entry as stale.
HEAD("http://google.com")#> Response [http://www.google.com/] #> Date: 2020-03-11 04:09 #> Status: 200 #> Content-Type: text/html; charset=ISO-8859-1 #> <EMPTY BODY>#> $date #> [1] "Wed, 11 Mar 2020 04:09:40 GMT" #> #> $expires #> [1] "-1" #> #> $`cache-control` #> [1] "private, max-age=0" #> #> $`content-type` #> [1] "text/html; charset=ISO-8859-1" #> #> $`content-encoding` #> [1] "gzip" #> #> $server #> [1] "gws" #> #> $`content-length` #> [1] "5148" #> #> $`x-xss-protection` #> [1] "0" #> #> $`x-frame-options` #> [1] "SAMEORIGIN" #> #> $`set-cookie` #> [1] "1P_JAR=2020-03-11-04; expires=Fri, 10-Apr-2020 04:09:40 GMT; path=/; domain=.google.com; Secure" #> #> attr(,"class") #> [1] "insensitive" "list"