mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context In order to keep documentation examples up to date, moving them to a repo where they will actually be built and run. ### Description Move documentation examples from doc repo to this one. ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
22 lines
645 B
C#
22 lines
645 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Net;
|
|
using Microsoft.Azure.Functions.Worker;
|
|
using Microsoft.Azure.Functions.Worker.Http;
|
|
|
|
public class Logo
|
|
{
|
|
[Function("GetLogo")]
|
|
public HttpResponseData Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "logo.png")] HttpRequestData req)
|
|
{
|
|
// Return logo.png that's in the root of the project
|
|
var response = req.CreateResponse(HttpStatusCode.OK);
|
|
response.Headers.Add("Content-Type", "image/png");
|
|
|
|
var logo = System.IO.File.ReadAllBytes("logo.png");
|
|
response.Body.Write(logo);
|
|
|
|
return response;
|
|
}
|
|
}
|