add long data to post - WeOnlyDo Discussion board

add long data to post (wodHttpDLX)

by Klinzter, Saturday, November 01, 2008, 15:57 (5867 days ago)

instead of using this

wodHttp1.Request.FormPost.Add Username , joe
wodHttp1.Request.FormPost.Add Password , joe

I would like to use this instead
wodHttp1.Request.FormPost.Add Username=joe&Password=joe

but when I see the post date it shows this
Username 3Djoe 26Password 3Djoe=

anyway to add to post but not encoding the data?

Re: add long data to post

by wodDamir, Saturday, November 01, 2008, 16:15 (5867 days ago) @ Klinzter

Hi Klintzer,

In that case, you should use wodHttpRequest instead. Just set it's Body property like this:

wodHttp1.Request.Body = Username=joe&Password=joe

And then Post the data to server.

Hope this helps.

Regards,
Damba

Re: add long data to post

by Klinzter, Saturday, November 01, 2008, 17:46 (5867 days ago) @ wodDamir

working.. thanks a lot!

Re: add long data to post

by Klinzter, Sunday, November 02, 2008, 02:20 (5867 days ago) @ Klinzter

well after testing I came with a little problem.. using this code

http1.Request.Body = Username=joe&Password=joe
http1.Post http://www.weonlydo.com/HttpDLX/Demo/TestFormPost.asp


getting this error
OOPS.. You have used and . Please try again with joe , joe .

Re: add long data to post

by wodDamir, Sunday, November 02, 2008, 02:52 (5867 days ago) @ Klinzter

Klintzer,

You also need to add the Content-type header prior to setting Body. You can do something like this:

wodHttp1.Request.Headers.Add Content-type , application/x-www-form-urlencoded

It should work after that.

Regards,
Damba