Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6389973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:28:12+00:00 2026-05-25T03:28:12+00:00

How does one read the request body in ASP.NET? I’m using the REST Client

  • 0

How does one read the request body in ASP.NET? I’m using the REST Client add-on for Firefox to form a GET request for a resource on a site I’m hosting locally, and in the Request Body I’m just putting the string “test” to try to read it on the server.

In the server code (which is a very simple MVC action) I have this:

var reader = new StreamReader(Request.InputStream);
var inputString = reader.ReadToEnd();

But when I debug into it, inputString is always empty. I’m not sure how else (such as in FireBug) to confirm that the request body is indeed being sent properly, I guess I’m just assuming that the add-on is doing that correctly. Maybe I’m reading the value incorrectly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:28:13+00:00Added an answer on May 25, 2026 at 3:28 am

    Maybe I’m misremembering my schooling, but I think GET requests don’t actually have a body. This page states.

    The HTML specifications technically define the difference between "GET" and "POST" so that former means that form data is to be encoded (by a browser) into a URL while the latter means that the form data is to appear within a message body.

    So maybe you’re doing things correctly, but you have to POST data in order to have a message body?

    Update

    In response to your comment, the most "correct" RESTful way would be to send each of the values as its own parameter:

    site.com/MyController/MyAction?id=1&id=2&id=3...
    

    Then your action will auto-bind these if you give it an array parameter by the same name:

    public ActionResult MyAction(int[] id) {...}
    

    Or if you’re a masochist you can maybe try pulling the values out of Request.QueryString one at a time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with WCF .NET 3.5 SP1 and have read that one does
How does one read a data file in an iPhone project? For example, lets
How does one choose the size of a buffer (bytes I read from or
I can read the MySQL documentation and it's pretty clear. But, how does one
I'm writing a web service (using ASP.NET MVC) and for support purposes we'd like
I am working in c# 4.0 to read a signed request I am using
does one perform better over the other in terms of indexing/quering etc ? e.g.
How does one go about authoring a Regular Expression that matches against all strings
How does one go about referencing a class's static properties in xaml? In other
How does one convert an image from one color profile to another (screen to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.