show request (General questions)
hello,
how can I see the request information on a textbox.. I am using vb6 and when I do a request using winsock I can get this data
GET http://www.google.com/ HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: PREFDATA
how can I print that same information using wodhttodlx
Re: show request
Hi.
You could use wodHttp.Request.Headers.ToString, that should do the trick.
You can use also DebugFile property and set it to some file, and wodHttpDLX will dump all traffic inside.
Regards,
Kreso
Re: show request
not showing all the data
Re: show request
I see. Then you have to combine
wodHttp1.Reqest.Method + wodHttp1.Request.URI + wodHttp1.HTTPVersion + VbCrlf + wodHttp1.Request.Headers.ToString + VbCrlf + wodHttp1.Request.Body
to obtain all the details.
Kreso
Re: show request
doing what you said im able to get this.. much better but its not showing host or the POST or GET
3/ip.php HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; AOL 8.0; Windows NT 5.1)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-type: application/x-www-form-urlencoded
Accept-Language: en-us,en;q=0.5
Accept-Encoding: none
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: close
Cookie:
name=mike&lastname=dols
Re: show request
Hmm. What is your value of wodHttp1.Request.Method property?
Kreso
Re: show request
wodHttp1.Request.Method this show 3 or 1 when I use GET
Re: show request
Hi Klinzter,
Can you please try something like this:
[code]
Dim mCol As Collection
Set mCol = New Collection
mCol.Add GET
mCol.Add HEAD
mCol.Add POST
mCol.Add PUT
mCol.Add DELETE
mCol.Add TRACE
Debug.Print mCol.Item(wodHttp1.Request.Method) & & requestURL.Text & & wodHttp1.HTTPversion
Debug.Print Host: & wodHttp1.HostName
[/code]
Let us know how it goes.
Drazen
Re: show request
Klinzter
Did you try to receive data from wodHttpDLX Response Headers?
[code]Debug.Print wodHttp1.Response.Headers.ToString[/code]
[code]Debug.Print Content-Type: & wodHttp1.Response.Headers( Content-Type )[/code]
Drazen
Re: show request
ok I got that part now how can I display the cookie in the textbox too
because this Debug.Print Winsock(Index).Request.Headers.ToString
shows only this, with no cookie data
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; AOL 8.0; Windows NT 5.1)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-type: application/x-www-form-urlencoded
Accept-Language: en-us,en;q=0.5
Accept-Encoding: none
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: close
Cookie:
is it possible to have something instead of
wodHttp1.DebugFile = App.Path & debug.txt
one fore requests
wodHttp1.DebugRequestData = txtRequest1.txt
that will show this
** Connecting to site.com on port 80
** Requesting URL http://site.com
POST /test.php HTTP/1.1
Host: site.com
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; AOL 8.0; Windows NT 5.1)
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-type: application/x-www-form-urlencoded
Accept-Language: en-us,en;q=0.5
Accept-Encoding: none
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: close
Cookie: IDName=KS48FKL8IJ7SDF=
Content-Length: 526
name=mike&lastname=dols
and one for the Response
wodHttp1.DebugResponseData = txtResponse1.txt
HTTP/1.1 200 OK
Cache-Control: no-cache, must-revalidate, proxy-revalidate
Pragma: no-cache
Content-Length: 30045
Content-Type: text/html; charset=utf-8
Expires: -1
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: user=sdsd expires=Mon, 15-Dec-2008 23:34:31 GMT; path=/
Date: Mon, 08 Dec 2008 23:34:30 GMT
<html>
<head>
<title>title</title>
</head>
<body>
test page
</body>
</html>
because at this point I have added about 25 customizations to the code to try and show the same data as debug file and I still cannot get the same results
thanks
Re: show request
Klinzter,
Unfortunately DebugFile is only for our internal use.
You can of course read data from DebugFile file and parse data you need.
Drazen
Re: show request
well for us to be able and develop software with your wodHttpDLX we also need data to debug.
Re: show request
Klinzter ,
OK then open DebugFile and read data from DebugFIle in your code.
I think you can use for that in VB6 FileSystemObject.
Drazen
Re: show request
that's not really what im looking for.. it would be really nice if I could have what I pasted in the previous posts
Re: show request
Klinzter,
Unfortunately as I mention already DebugFile is only for our internal usage.
Internal usage imply that maybe in future DebugFile will be changed because we need some extra data to debug.
So we cannot guarantee that DebugFile will not be changed in order to help us in resolving issues in wodHttpDLX.
Drazen