This project is read-only.

HTTPClient GET and JSON Payload

Topics: Web Api
Aug 24, 2011 at 3:07 PM


How do you make a HTTP GET using HTTPClient that passes JSON as a payload?

In IQueryable exaample, it's illustrated to POST JSON payload using HTTPClient.

For CRUD scenarios, POST URI will be typically reserved for INSERT/UPDATE and GET URI will be reserved for SELECT operations.

While doing this SELECT operations it may be necessary to pass in more than 1 parameter(like street,zipcode, etc instead of just customerId).

In such scenario, multiple parameters can be clubbed together as JSON payload and the invoke GET operation. Is this recommended?


Aug 26, 2011 at 8:04 PM

I don't believe that GET requests can contain payloads

You might want to include parameters in the querystring.