mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
68e24a60b1
This reverts commit 44feef1985
.
29 lines
868 B
C#
29 lines
868 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Nancy;
|
|
using Nancy.Responses;
|
|
|
|
namespace Wabbajack.CacheServer
|
|
{
|
|
/// <summary>
|
|
/// These endpoints are used by the testing service to verify that manual and direct
|
|
/// downloading works as expected.
|
|
/// </summary>
|
|
public class TestingEndpoints : NancyModule
|
|
{
|
|
public TestingEndpoints() : base("/")
|
|
{
|
|
Get("/WABBAJACK_TEST_FILE.txt", _ => "Cheese for Everyone!");
|
|
Get("/WABBAJACK_TEST_FILE.zip", _ =>
|
|
{
|
|
var response = new StreamResponse(() => new MemoryStream(Encoding.UTF8.GetBytes("Cheese for Everyone!")), "application/zip");
|
|
return response.AsAttachment("WABBAJACK_TEST_FILE.zip");
|
|
});
|
|
}
|
|
}
|
|
}
|