feat: new matcher system instead of manually 'match'ing in servcie
This commit is contained in:
parent
f305cb5a85
commit
638b0376d8
15 changed files with 646 additions and 225 deletions
|
@ -24,7 +24,7 @@ fn rocket() -> _ {
|
|||
// We define the port of the server running locally and the hostname we want to route to it.
|
||||
let body = json!({
|
||||
"port": 8000,
|
||||
"hostname": "localhost:8005",
|
||||
"hosts": ["localhost:8005"],
|
||||
});
|
||||
|
||||
// Send it to Boxy's API
|
||||
|
@ -35,7 +35,24 @@ fn rocket() -> _ {
|
|||
.send()
|
||||
.unwrap();
|
||||
|
||||
println!("{}", res.text().unwrap());
|
||||
let id = res.text().unwrap();
|
||||
|
||||
println!("{}", id);
|
||||
|
||||
let body2 = json!({});
|
||||
|
||||
// Send it to Boxy's API
|
||||
let res2 = client
|
||||
.delete(format!(
|
||||
"http://{}:{}/endpoint/{}",
|
||||
BOXY_ADDRESS, BOXY_PORT, id
|
||||
))
|
||||
.basic_auth(CLIENT_NAME, Some(CLIENT_SECRET))
|
||||
.json(&body2)
|
||||
.send()
|
||||
.unwrap();
|
||||
|
||||
println!("{}", res2.text().unwrap());
|
||||
|
||||
build().mount("/", routes![index])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue