Skip to content

Demonstrate GET, POST, PUT, and DELETE with HttpClient#18650

Merged
Rick-Anderson merged 8 commits into
dotnet:masterfrom
serpent5:serpent5/12580
Jun 11, 2020
Merged

Demonstrate GET, POST, PUT, and DELETE with HttpClient#18650
Rick-Anderson merged 8 commits into
dotnet:masterfrom
serpent5:serpent5/12580

Conversation

@serpent5
Copy link
Copy Markdown
Contributor

@serpent5 serpent5 commented Jun 3, 2020

Fixes #12580.

@serpent5
Copy link
Copy Markdown
Contributor Author

serpent5 commented Jun 5, 2020

@Rick-Anderson Are you happy with this approach? I think I'll skip the System.Net.Http.Json stuff in this PR but cover it later in another change. If you have time, and you're interested, you should be able to run the sample app as is. I know you're busy, so don't worry if you don't have the time or desire. 😄

@Rick-Anderson Rick-Anderson marked this pull request as ready for review June 6, 2020 03:41
@Rick-Anderson
Copy link
Copy Markdown
Contributor

Wow, this is fantastic. We just need to document it must be run from https://localhost:5001 (or you must change the port). I tried to catch the socket exception and return a warning but was unable to. The would probably pollute the clean code anyway.
Good plan. Let me know how I can help.

@serpent5
Copy link
Copy Markdown
Contributor Author

serpent5 commented Jun 8, 2020

@Rick-Anderson Thanks for taking a look. I added a commit that uses the incoming request to determine the correct address to use, so it should work whatever the host/port is.

I'm going to work on getting some content into the topic next. What kind of detail do you think should go into the topic?

@Rick-Anderson
Copy link
Copy Markdown
Contributor

@serpent5 we don't want a cook-book step by step instructions how you made the code - like what MSDN used to do. Let the code do the talking. Refer to the code and explain how it work.

Does that help?

@serpent5
Copy link
Copy Markdown
Contributor Author

serpent5 commented Jun 8, 2020

Yeah, sure, that makes sense, thanks.

I'll work on adding a new section that focuses on the POST example but also refers the to the PUT and DELETE examples, for completeness. I'm hoping the reader can just spin up the sample and see it all in action, without being cook-booked through it, like you said. I should have it ready by the end of the week, if not a bit earlier.

@serpent5
Copy link
Copy Markdown
Contributor Author

@Rick-Anderson Whenever you have time, could you take a look at the changes I made to the topic? Could you also provide a rendered view of the page so I can see what it looks like?

@Rick-Anderson
Copy link
Copy Markdown
Contributor

To review the doc build

Copy link
Copy Markdown
Contributor

@Rick-Anderson Rick-Anderson left a comment

Choose a reason for hiding this comment

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

Awesome!

Comment thread aspnetcore/fundamentals/http-requests.md Outdated
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
@serpent5
Copy link
Copy Markdown
Contributor Author

@Rick-Anderson I'm getting a 404 on the Dropbox link. If you're happy with how this renders, don't worry about providing a new link.

@Rick-Anderson Rick-Anderson merged commit ce87a9b into dotnet:master Jun 11, 2020
@serpent5 serpent5 deleted the serpent5/12580 branch June 11, 2020 20:18
@Rick-Anderson
Copy link
Copy Markdown
Contributor

Have a look at the published doc when you have time.

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.

HTTP POST example?

2 participants