Skip to content

Fix port in curl invocation in example.#764

Merged
yoshuawuyts merged 1 commit intohttp-rs:mainfrom
jswrenn:patch-1
Dec 18, 2020
Merged

Fix port in curl invocation in example.#764
yoshuawuyts merged 1 commit intohttp-rs:mainfrom
jswrenn:patch-1

Conversation

@jswrenn
Copy link
Contributor

@jswrenn jswrenn commented Dec 12, 2020

The example server binds port 8080:

//! app.listen("127.0.0.1:8080").await?;

...but the example curl invocations post to port 8000:

tide/src/lib.rs

Lines 47 to 51 in 46bf28a

//! $ curl localhost:8000/orders/shoes -d '{ "name": "Chashu", "legs": 4 }'
//! Hello, Chashu! I've put in an order for 4 shoes
//!
//! $ curl localhost:8000/orders/shoes -d '{ "name": "Mary Millipede", "legs": 750 }'
//! number too large to fit in target type

This patch modifies the curl invocations to post to port 8080, instead.

Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, great catch -- thanks so much!

@yoshuawuyts yoshuawuyts merged commit c5098a9 into http-rs:main Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants