Skip to content

Commit 7f74a7b

Browse files
authored
HttpRequest improvements for middlewares (#126)
* added path_args method for http request to simplify path params extraction in middlewares * fixed a bug with Next; added `query_args` method
1 parent e374c13 commit 7f74a7b

File tree

14 files changed

+268
-31
lines changed

14 files changed

+268
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Volga
22
Fast, Easy, and very flexible Web Framework for Rust based on [Tokio](https://tokio.rs/) runtime and [hyper](https://hyper.rs/) for fun and painless microservices crafting.
33

4-
[![latest](https://img.shields.io/badge/latest-0.7.0-blue)](https://crates.io/crates/volga)
4+
[![latest](https://img.shields.io/badge/latest-0.7.1-blue)](https://crates.io/crates/volga)
55
[![latest](https://img.shields.io/badge/rustc-1.90+-964B00)](https://crates.io/crates/volga)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-violet.svg)](https://github.com/RomanEmreis/volga/blob/main/LICENSE)
77
[![Build](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml/badge.svg)](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml)
@@ -23,7 +23,7 @@ Fast, Easy, and very flexible Web Framework for Rust based on [Tokio](https://to
2323
### Dependencies
2424
```toml
2525
[dependencies]
26-
volga = "0.7.0"
26+
volga = "0.7.1"
2727
tokio = { version = "1", features = ["full"] }
2828
```
2929
### Simple request handler

volga-dev-cert/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volga-dev-cert"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2024"
55
rust-version = "1.90.0"
66
authors = ["Roman Emreis <roman.emreis@outlook.com>"]

volga-dev-cert/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Volga Development Certificates
22
A Rust library for generating self-signed TLS certificates for local development.
33

4-
[![latest](https://img.shields.io/badge/latest-0.7.0-blue)](https://crates.io/crates/volga)
4+
[![latest](https://img.shields.io/badge/latest-0.7.1-blue)](https://crates.io/crates/volga)
55
[![latest](https://img.shields.io/badge/rustc-1.90+-964B00)](https://crates.io/crates/volga)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-violet.svg)](https://github.com/RomanEmreis/volga/blob/main/LICENSE)
77
[![Build](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml/badge.svg)](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml)

volga-di/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volga-di"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2024"
55
rust-version = "1.90.0"
66
authors = ["Roman Emreis <roman.emreis@outlook.com>"]

volga-di/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Volga DI
22
A standalone, flexible, and easy-to-configure DI container.
33

4-
[![latest](https://img.shields.io/badge/latest-0.7.0-blue)](https://crates.io/crates/volga)
4+
[![latest](https://img.shields.io/badge/latest-0.7.1-blue)](https://crates.io/crates/volga)
55
[![latest](https://img.shields.io/badge/rustc-1.90+-964B00)](https://crates.io/crates/volga)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-violet.svg)](https://github.com/RomanEmreis/volga/blob/main/LICENSE)
77
[![Build](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml/badge.svg)](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml)
@@ -14,12 +14,12 @@ A standalone, flexible, and easy-to-configure DI container.
1414
#### Standalone
1515
```toml
1616
[dependencies]
17-
volga-di = "0.7.0"
17+
volga-di = "0.7.1"
1818
```
1919
#### Part of Volga Web Framework
2020
```toml
2121
[dependencies]
22-
volga = { version = "0.7.0", features = ["di"] }
22+
volga = { version = "0.7.1", features = ["di"] }
2323
```
2424

2525
### Example

volga-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volga-macros"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2024"
55
rust-version = "1.90.0"
66
authors = ["Roman Emreis <roman.emreis@outlook.com>"]

volga-macros/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Volga Macros
22
Macros library for Volga Web Framework
33

4-
[![latest](https://img.shields.io/badge/latest-0.7.0-blue)](https://crates.io/crates/volga)
4+
[![latest](https://img.shields.io/badge/latest-0.7.1-blue)](https://crates.io/crates/volga)
55
[![latest](https://img.shields.io/badge/rustc-1.90+-964B00)](https://crates.io/crates/volga)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-violet.svg)](https://github.com/RomanEmreis/volga/blob/main/LICENSE)
77
[![Build](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml/badge.svg)](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml)
@@ -12,6 +12,6 @@ Macros library for Volga Web Framework
1212
## Dependencies
1313
```toml
1414
[dependencies]
15-
volga = { version = "0.7.0", features = ["macros"] }
15+
volga = { version = "0.7.1", features = ["macros"] }
1616
```
1717

volga/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "volga"
3-
version = "0.7.0"
3+
version = "0.7.1"
44
edition = "2024"
55
rust-version = "1.90.0"
66
authors = ["Roman Emreis <roman.emreis@outlook.com>"]
@@ -53,9 +53,9 @@ tokio-tungstenite = { version = "0.28.0", optional = true }
5353
tracing = { version = "0.1.41", default-features = false, optional = true }
5454

5555
# volga
56-
volga-dev-cert = { path = "../volga-dev-cert", version = "0.7.0", optional = true }
57-
volga-di = { path = "../volga-di", version = "0.7.0", optional = true }
58-
volga-macros = { path = "../volga-macros", version = "0.7.0", optional = true }
56+
volga-dev-cert = { path = "../volga-dev-cert", version = "0.7.1", optional = true }
57+
volga-di = { path = "../volga-di", version = "0.7.1", optional = true }
58+
volga-macros = { path = "../volga-macros", version = "0.7.1", optional = true }
5959

6060
[dev-dependencies]
6161
base64 = { version = "0.22.1" }

volga/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Volga
22
Fast, Easy, and very flexible Web Framework for Rust based on [Tokio](https://tokio.rs/) runtime and [hyper](https://hyper.rs/) for fun and painless microservices crafting.
33

4-
[![latest](https://img.shields.io/badge/latest-0.7.0-blue)](https://crates.io/crates/volga)
4+
[![latest](https://img.shields.io/badge/latest-0.7.1-blue)](https://crates.io/crates/volga)
55
[![latest](https://img.shields.io/badge/rustc-1.90+-964B00)](https://crates.io/crates/volga)
66
[![License: MIT](https://img.shields.io/badge/License-MIT-violet.svg)](https://github.com/RomanEmreis/volga/blob/main/LICENSE)
77
[![Build](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml/badge.svg)](https://github.com/RomanEmreis/volga/actions/workflows/rust.yml)
@@ -23,7 +23,7 @@ Fast, Easy, and very flexible Web Framework for Rust based on [Tokio](https://to
2323
### Dependencies
2424
```toml
2525
[dependencies]
26-
volga = "0.7.0"
26+
volga = "0.7.1"
2727
tokio = { version = "1", features = ["full"] }
2828
```
2929
### Simple request handler

volga/src/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
// Re-exporting HTTP status codes, Response and some headers from hyper/http
44
pub use hyper::{
5-
http::{Extensions, Method, Uri},
5+
http::{request::Parts, Extensions, Method, Uri},
66
Response,
77
StatusCode,
88
};

0 commit comments

Comments
 (0)