Reading a remote server's POST response to my server's POST and GET commands
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Reading a remote server's POST response to my server's POST and GET commands

Threaded View

  1. #1
    Join Date
    Oct 2013
    Posts
    6

    Reading a remote server's POST response to my server's POST and GET commands

    I'm new to C#. I have some questions about POST and GET communication between two servers:

    1. I put together a WebRequest to Http POST to a remote server. I want to read the response from the remote server, which will be a POST to my server.
    Will a HTTP WebResponse using a StreamReader be sufficient to read the remoter server's POST response? If not, do I need to use the HttpListener to receive that POST?

    2. This question is similar to the previous. I need to implement a Http GET command to retrieve data from the remote server's .shtml page.
    I used a WebRequest with the GET cmd. Next, I used a StreamReader to get the page. I then used the WebResponse with a StreamReader
    to read the other server's POST response. Is this the appropriate approach to GET data from the .shtml page and read the remote server's POST response?
    If not, do I need to use the HttpListener to receive that POST? The attached code is what I've done.

    Thanks for any suggestions, -KW
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center