HTTP

Read Raw JSON Data from HTTP POST for ASP.NET MVC 4 Web API

The Web API is a good step catching up to Ruby on Rails and Django but isn’t nearly as well documented. If your posted data doesn’t match exactly a model object, it’s hard to figure out how to just get all the data out and process it yourself. Inside the

public void Post()

tag, you can have access to a Request member from ApiController and with it, you can do

JsonObject input = Request.Content.ReadAsAsync().Result;

to get the data out. A key detail is that if you do so, you cannot put any parameters in the Post method declaration or it will try to bind it to which ever parameter type you specified.

ABAP Get REST XML and Parse XML

This tutorial will help you use ABAP to connect to any web service and process the resulting output. ABAP has native support for XML so it will be easiest to get your information in XML format rather than JSON and others. For this example, I will use a CBC’s news feed but it can be Digg top stories, Twitter, anything. The XML should look something like the picture below where each news article is enclosed in <ITEM> tags. Read More…

 Scroll to top