Skip to content

Commit

Permalink
Merge pull request #80 from uqbar-dao/timlucmiptev-patch-1
Browse files Browse the repository at this point in the history
Update chapter_4.md
  • Loading branch information
dr-frmr authored Jan 22, 2024
2 parents 7a686d9 + a7234a1 commit e97ecca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/my_first_app/chapter_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use kinode_process_lib::{

Keep the custom `body` type the same, and keep using that for terminal input.

At the beginning of the init function, in order to receieve HTTP requests, you must use the `kinode_process_lib::http` library to bind a new path. Binding a path will cause the process to receive all HTTP requests that match that path.
At the beginning of the init function, in order to receive HTTP requests, you must use the `kinode_process_lib::http` library to bind a new path. Binding a path will cause the process to receive all HTTP requests that match that path.
You can also bind static content to a path using another function in the library.
```rust
// ...
Expand Down Expand Up @@ -115,7 +115,7 @@ let Ok(server_request) = http::HttpServerRequest::from_bytes(message.body()) els
```

Next, you must parse out the HTTP request from the general type.
This is.osessary because the `HttpServerRequest` enum contains both HTTP protocol requests and requests related to WebSockets.
This is necessary because the `HttpServerRequest` enum contains both HTTP protocol requests and requests related to WebSockets.
Note that it's quite possible to streamline this series of request refinements if you're only interested in one type of request — this example is overly thorough for demonstration purposes.

```rust
Expand Down

0 comments on commit e97ecca

Please sign in to comment.