mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-06 22:37:39 +03:00
refactory response body
This commit is contained in:
parent
779b480663
commit
c435f16170
12 changed files with 148 additions and 51 deletions
|
@ -19,7 +19,7 @@ fn index(req: &mut HttpRequest, _: Payload, state: &AppState) -> HttpResponse {
|
|||
println!("{:?}", req);
|
||||
state.counter.set(state.counter.get() + 1);
|
||||
httpcodes::HTTPOk.with_body(
|
||||
Body::Binary(format!("Num of requests: {}", state.counter.get()).into()))
|
||||
format!("Num of requests: {}", state.counter.get()))
|
||||
}
|
||||
|
||||
/// `MyWebSocket` counts how many messages it receives from peer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue