Capturing Response of a GET or Post
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
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
This discussion has been closed.
Comments
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!