I POST to website's JSON-response URL using WebBrowser.Navigate()
.
All goes well, including the webBrowser1_DocumentCompleted()
event handler being called.
But instead of getting a "quiet" response (e.g. webBrowser1.Document
) that I can handle programmatically, I receive a File Download dialog box:
If I click the Save
button and later examine the file, it contains exactly the JSON response that I expect.
But I want the program capture this JSON response in-code, without displaying that dialog and having to click the Save
button.
How do I capture JSON response using WebBrowser control?
Note: before posting this question I searched SO and all I found was a similar question for which the accepted answer doesn't really explain how to do this (I'm already handling webBrowser1_DocumentCompleted). Any tips?
Update: All my searches so far yielded nothing in regard to using WebBrowser control to fetch JSON responses. Perhaps I am approaching this completely wrong? What am I missing?