Reputation: 13
I have a vendor that has supplied me with info I need to code in order to receive information from them. I need to send a POST request out to a URL ending in .xml. The documentation gives a JSON format and returns a response in XML. I'm a C# programmer and am not familiar with this yet. What type of request is this and how can I find an example on how to do it? I'm simply unsure of what to search for. If I run this code in JSON in the .aspx file, are there any security risks that the user will be able to see code by doing a view source?
Upvotes: 1
Views: 269
Reputation: 273244
Step 1: Use WebClient to download it.
string xml = "";
using (var client = new WebClient())
{
xml = client.DownLoadString("yourURL");
}
// process the XML
I'm not sure what the JSON angle is, since the URI is ending in XML.
Inspect the string and see what you've got.
Upvotes: 1