summaryrefslogtreecommitdiffstats
path: root/docs/content/en/hugo-pipes
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-01-16 12:44:39 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-01-16 14:44:15 +0100
commit6a579ebac3a81df61f22988e3eb55f7cb35ce523 (patch)
tree42eff3d1ab464a53cde88b619b0f6938bf71efed /docs/content/en/hugo-pipes
parentf13531e608ac36cce9d679f6742a112cbab8afd1 (diff)
Add fill HTTP Response info into .Data in resources.GetRemote
See #10604
Diffstat (limited to 'docs/content/en/hugo-pipes')
-rwxr-xr-xdocs/content/en/hugo-pipes/introduction.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/content/en/hugo-pipes/introduction.md b/docs/content/en/hugo-pipes/introduction.md
index c16572e48..116523fd5 100755
--- a/docs/content/en/hugo-pipes/introduction.md
+++ b/docs/content/en/hugo-pipes/introduction.md
@@ -50,6 +50,20 @@ With `resources.GetRemote`, the first argument is a remote URL:
`resources.Get` and `resources.GetRemote` return `nil` if the resource is not found.
+{{< new-in "0.110.0" >}} You can get information about the HTTP Response using `.Data` in the returned `Resource`. This is especially useful for HEAD request without any body. The Data object contains:
+
+StatusCode
+: The HTTP status code, e.g. 200
+Status
+: The HTTP status text, e.g. "200 OK"
+TransferEncoding
+: The transfer encoding, e.g. "chunked"
+ContentLength
+: The content length, e.g. 1234
+ContentType
+: The content type, e.g. "text/html"
+
+
## Copy a Resource
{{< new-in "0.100.0" >}}