mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-15 09:41:28 +00:00
Cleanup code and formatting
This commit is contained in:
parent
d64aa421fe
commit
61f027b57e
13 changed files with 42 additions and 46 deletions
|
@ -47,7 +47,7 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
|||
|
||||
public Task<HttpResponseMessage> AuthenticatedRequest(string endpoint, string mmAuth, HttpMethod method)
|
||||
{
|
||||
using HttpRequestMessage? requestMessage = new(method, endpoint);
|
||||
using HttpRequestMessage requestMessage = new(method, endpoint);
|
||||
requestMessage.Headers.Add("Cookie", mmAuth);
|
||||
|
||||
return this.Client.SendAsync(requestMessage);
|
||||
|
@ -61,7 +61,7 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
|||
|
||||
public async Task<HttpResponseMessage> AuthenticatedUploadFileRequest(string endpoint, string filePath, string mmAuth)
|
||||
{
|
||||
using HttpRequestMessage? requestMessage = new(HttpMethod.Post, endpoint);
|
||||
using HttpRequestMessage requestMessage = new(HttpMethod.Post, endpoint);
|
||||
requestMessage.Headers.Add("Cookie", mmAuth);
|
||||
requestMessage.Content = new StringContent(await File.ReadAllTextAsync(filePath));
|
||||
return await this.Client.SendAsync(requestMessage);
|
||||
|
@ -69,7 +69,7 @@ namespace LBPUnion.ProjectLighthouse.Tests
|
|||
|
||||
public async Task<HttpResponseMessage> AuthenticatedUploadDataRequest(string endpoint, byte[] data, string mmAuth)
|
||||
{
|
||||
using HttpRequestMessage? requestMessage = new(HttpMethod.Post, endpoint);
|
||||
using HttpRequestMessage requestMessage = new(HttpMethod.Post, endpoint);
|
||||
requestMessage.Headers.Add("Cookie", mmAuth);
|
||||
requestMessage.Content = new ByteArrayContent(data);
|
||||
return await this.Client.SendAsync(requestMessage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue