Last post Sep 17, 2015 03:03 AM by jmpalines
Oct 14, 2014 10:26 PM|dr43058|LINK
I realize the following does not follow the well-established scheme for RESTful url scheme design. But I have to live with what has been established before me.
How do you retrieve JSON from an external RESTful endpoint using a
POST verb and populate a SELECT(DROPDOWNS) input element in an
MVC VIEW? Subsequently, based on the first SELECT that is selected, I will take the ID of the parent item just selected and issue a second RESTful query for its children having a foreign key matching the id of the parent.
HEADERS: Content-Type: application/json
Request body for customers:
Request body for orders
Sep 17, 2015 03:03 AM|jmpalines|LINK
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
var result = streamReader.ReadToEnd();
response = JObject.Parse(result);