Skip to content

Commit

Permalink
Update sdk/rust/README.md
Browse files Browse the repository at this point in the history
Signed-off-by: tpmccallum [email protected]

Co-authored-by: Ryan Levick <[email protected]>
Signed-off-by: Timothy McCallum <[email protected]>
  • Loading branch information
tpmccallum and rylev authored Dec 18, 2023
1 parent 5af7724 commit 190f9cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn handle_hello_world(req: Request) -> anyhow::Result<impl IntoResponse> {
The important things to note about the function above are:

- the `spin_sdk::http_component` macro marks the function as the entry point for the Spin component,
- in the function signature (`fn handle_hello_world(req: Request) -> anyhow::Result<impl IntoResponse>`), `req` can be any number of types, including the built-in `Request` type or the `http::Request` from the popular `http` crate
- in the function signature (`fn handle_hello_world(req: Request) -> anyhow::Result<impl IntoResponse>`), `req` can be any number of types, including the built-in `Request` type or the `http::Request` type from the popular `http` crate
- in the function signature, the response type can be many things, including `anyhow::Result<impl IntoResponse>` (as shown above) or the `http::Response` type from the `http` crate (e.g. `Result<Response>`). Note - Using the `http` crate will require you to add it, e.g. `cargo install http`.

### Making Outbound HTTP Requests
Expand Down

0 comments on commit 190f9cc

Please sign in to comment.