Retrieve the site logo image
| Name | Type | Description |
| authenticate | bool? | Force authentication for request (default: false) |
| default | string? | Absolute uri for default image |
The Content-Disposition, Content-Length, and Content-Type headers provide information about the retrieved file. You can also use GET:site/logo to get the same response as it has the same endpoint.
Use PUT:site/logo.png to set the site logo.
The following code example retrieves the site logo and saves it in the caller's temporary directory:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
DreamMessage msg = p.At("site", "logo").Get();
using (FileStream fs = System.IO.File.OpenWrite(Path.GetTempPath() + msg.ContentDisposition.FileName))
{
byte[] fileData = msg.AsBytes();
fs.Write(fileData, 0, fileData.Length);
} The following command retrieves the site logo image:
curl -u username:password -i http://mindtouch.address/@api/deki/site/log