From 2c48ef950ccc73b388101cd2626b10b859d2f139 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 29 Aug 2024 08:58:57 +0200 Subject: [PATCH] Changed .NET ready to be a get request --- app/MindWork AI Studio/Tools/RustService.cs | 2 +- runtime/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Tools/RustService.cs b/app/MindWork AI Studio/Tools/RustService.cs index f14abf67..570db290 100644 --- a/app/MindWork AI Studio/Tools/RustService.cs +++ b/app/MindWork AI Studio/Tools/RustService.cs @@ -80,7 +80,7 @@ public sealed class RustService(string apiPort) : IDisposable { const string URL = "/system/dotnet/ready"; this.logger!.LogInformation("Notifying Rust runtime that the app is ready."); - var response = await this.http.PostAsync(URL, new StringContent(string.Empty)); + var response = await this.http.GetAsync(URL); if (!response.IsSuccessStatusCode) { this.logger!.LogError($"Failed to notify Rust runtime that the app is ready: '{response.StatusCode}'"); diff --git a/runtime/src/main.rs b/runtime/src/main.rs index 73cd684c..1472ba9b 100644 --- a/runtime/src/main.rs +++ b/runtime/src/main.rs @@ -609,7 +609,7 @@ fn dotnet_port() -> String { format!("{dotnet_server_port}") } -#[post("/system/dotnet/ready")] +#[get("/system/dotnet/ready")] async fn dotnet_ready() { let main_window_spawn_clone = &MAIN_WINDOW; let dotnet_server_port = *DOTNET_SERVER_PORT;