locked
Simple Example of sending a request RRS feed

Answers

  • The easiest way to see the code is to record a test and then generate code from the recorded test.

    1) Create a test project
    2) Add a web test, record a few pages, and hit stop on the recorder in IE.
    3) When you are back in VS, click the Generate Coded Test button on the web test editor toolbar.  This will create a coded test.
    Monday, July 18, 2005 6:45 PM
    Moderator

All replies

  • The easiest way to see the code is to record a test and then generate code from the recorded test.

    1) Create a test project
    2) Add a web test, record a few pages, and hit stop on the recorder in IE.
    3) When you are back in VS, click the Generate Coded Test button on the web test editor toolbar.  This will create a coded test.
    Monday, July 18, 2005 6:45 PM
    Moderator
  • Hi,
    Thanks for the reply. Looking at the generate code option gave me a pretty good idea of how a request should be made. I have some more questions, however. Please bear with me with they sound trivial.



    1. If 'request2' is a request I send to the server, is 'yield return request2'  the statement that is actually responsible for sending the request to the server? If not, what is the purpose of the 'yield' statement and which statement is responsible for sending the request.

    2. I would also like to be able to see the response sent by the server in reply to my request. And get some information from the response such as status codes etc. From the API, I know I can get certain information from the response. But what I don't know to do is how to get to the response, and how to parse it, when I make a request to a web server?

    TIA,
    Sree

    Tuesday, July 19, 2005 10:39 AM