ASP.NET/C#: HTTP Post Request

Using ASP.NET/C# I want to make an HTTP POST request.
Method: POST
Data: {"x":"hello","y":"world"}
Header: Content-Type: application/json

This is how it is done from a Linux command line using cURL:
curl -X POST -d '{"x":"hello","y":"world"}' -H "Content-Type: application/json"

Open in new window

How can this be done using only C# for ASP.NET?
LVL 16
Who is Participating?
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
See if this page from Microsoft helps:   There is a 'complete' example at the bottom of the page for C# and VB.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.