Capturing Response of a GET or Post

jb007jb007 Posts: 12
edited December 22, 2005 7:44AM in ANTS Load
Sorry if this question has been answered already.
I am looking to capture the response of a WebClient.Get Call. Is there a way to do it? I am expecting a response of a single line which contains a dynamic value. I have to do another get based on the dynamic value. Is there any way to accomplish this using ANTSLoad?

TIA

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    Good question. Where is this variable returned? For example, if it is in one of the headers, you'd need to assign the value to a string. If it is in the HTML body, this is more complicated, as you'd need to parse the value out of the web page content using string functions such as substring().

    For instance, capturing a redirection would look like [code]Dim redirUrl As String
    redirUrl=HttpResponse.Headers.Get("Location")[.code]

    To get a handle on the actual web page content, you can search WebClient.HttpResponse.Content.

    Hopefully you find this useful!
This discussion has been closed.