HTTPS post with httpdlx - WeOnlyDo Discussion board

HTTPS post with httpdlx (wodHttpDLX)

by srj, Thursday, February 12, 2009, 18:02 (5558 days ago)

Hi,
I would like to post some data to a https server.
i have set the headers with wodHttp1.Request.Headers.Add
and data with wodHttp1.Request.FormPost.Add

But the server is is not forwarding to the new page.


Do you need any other details? Can u help me??

Re: HTTPS post with httpdlx

by woddrazen, Thursday, February 12, 2009, 18:41 (5558 days ago) @ srj

Hi,


Maybe you aren't able to connect there because you didn't send all information that is needed.

You can find full request that should be send to server by using some HTTP and HTTPS analyzing tool like IEWatch.

Can you check that and let us know how it goes?


Regards,
Drazen

Re: HTTPS post with httpdlx

by srj, Friday, February 13, 2009, 03:02 (5558 days ago) @ woddrazen

thank you for your reply.
could u pls tell
what all should i write when i do a post call to a https server
i mean the what all functions/properties should i set wit hhttpdlx?


thank you

Re: HTTPS post with httpdlx

by woddrazen, Friday, February 13, 2009, 09:02 (5558 days ago) @ srj

Hi,


Basically you should use wodHttpDLX Request object Cookies.Add and Request object FormPost.Add Method.
[code]http1.Blocking = True
http1.Get https://somehost.com

For j = 0 To http1.Response.Cookies.Count - 1
http1.Request.Cookies.Add http1.Response.Cookies(j).Name, http1.Response.Cookies(j).Value
Next

http1.Request.FormPost.Add field_name1 , field_value1
http1.Request.FormPost.Add field_name2 , field_value2
...
http1.Post https://somehost.com/something_if_needed

http1.Get https://somehost.com/newpage [/code]
Let us know how it goes.


Drazen

Re: HTTPS post with httpdlx

by srj, Friday, February 13, 2009, 13:28 (5557 days ago) @ woddrazen

Thank you.
I have done the same as you said. But still its not working correctly. I mean the data is posted i think but it does not forwards me to the new page.
Should i type http1.get ( at last) for the new page. Wont dlx automatically get the results of the new forwarded page?

My point of working is .:
I got all headers that are sent to the site while i manually browser the page and enter the data. I made the same with your httpdlx but i am not forwarded to the page where i should be go what could be the reason?

so shouldnt i use http1.secure?
are there any properties that should be set for a HTTPS POST?

Re: HTTPS post with httpdlx

by woddrazen, Friday, February 13, 2009, 14:12 (5557 days ago) @ srj

Hi,


Can you maybe show us your code snippet?


Drazen

Re: HTTPS post with httpdlx

by srj, Friday, February 13, 2009, 17:52 (5557 days ago) @ woddrazen

Http1.Secure = 2
Http1.Compression = True
Http1.Blocking = True
Http1.HTTPversion = HTTP/1.1

Http1.Request.Headers.Add User-Agent , UserAgent
Http1.Request.Headers.Add Accept , text/html
Http1.Request.Headers.Add Accept-Language , en-us,en;q=0.5
Http1.Request.Headers.Add Accept-Charset , ISO-8859-1,utf-8;q=0.7,*;q=0.7
Http1.Request.Headers.Add Keep-Alive , 300
Http1.Request.Headers.Add Connection , Keep-Alive

Dim j
For j = 0 To Http1.Response.Cookies.Count - 1
Http1.Request.Cookies.Add Http1.Response.Cookies(j).name, Http1.Response.Cookies(j).Value
Next

Http1.Request.FormPost.Add FirstName , FIRSTNAME
Http1.Request.FormPost.Add LastName , LASTNAME
Http1.Request.FormPost.Add Email , EMAIL


Http1.HostName = www.mysite.com
Http1.Post /myvar.php

hope you can help!
i want to post to https://www.mysite.com/myvar.php

Re: HTTPS post with httpdlx

by wodDamir, Friday, February 13, 2009, 18:00 (5557 days ago) @ srj

Hi srj,

Why don't you simply specify your https:// site in Post call?

If URL you called Post method on has https in it, wodHTTPDlx will automatically use set Secure property.

Also, can you please set AutoRedirect property to true??

Regards,
Damba

Re: HTTPS post with httpdlx

by srj, Friday, February 13, 2009, 18:02 (5557 days ago) @ wodDamir

stilll not working ............

Re: HTTPS post with httpdlx

by wodDamir, Friday, February 13, 2009, 18:04 (5557 days ago) @ srj

Srj,

I honestly can't tell you what exactly you do wrong without trying it out on my side. Can you provide me with needed information so I could try it out?

You can send any sensitive information to techsupport@weonlydo.com

Regards,
Damba

Re: HTTPS post with httpdlx

by srj, Friday, February 13, 2009, 18:08 (5557 days ago) @ wodDamir

i havee sent the mail.