Skip to content

Commit

Permalink
Fix network method (#1702)
Browse files Browse the repository at this point in the history
## Problem

See #1701. The CLI uses a PUT instead of a POST when applying the
network configuration.

## Solution

Use the correct HTTP verb when applying the network configuration.

## Testing

- Tested manually
  • Loading branch information
imobachgs authored Oct 28, 2024
2 parents 9579a95 + bf08155 commit b1e266b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rust/agama-lib/src/network/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl NetworkClient {
// trying to be tricky here. If something breaks then we need a put method on
// BaseHTTPClient which doesn't require a serialiable object for the body
self.client
.put_void(&format!("/network/system/apply").as_str(), &())
.post_void(&format!("/network/system/apply").as_str(), &())
.await?;

Ok(())
Expand Down
6 changes: 6 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Oct 28 09:24:48 UTC 2024 - Imobach Gonzalez Sosa <[email protected]>

- Use the correct method to apply the network configuration from
the CLI (gh#agama-project/agama#1701).

-------------------------------------------------------------------
Wed Oct 23 15:25:36 UTC 2024 - Imobach Gonzalez Sosa <[email protected]>

Expand Down

0 comments on commit b1e266b

Please sign in to comment.