setting request.body - WeOnlyDo Discussion board

setting request.body (General questions)

by steve, Tuesday, December 22, 2009, 05:20 (5449 days ago)

i'm having trouble getting variables to pass on a php when i set the body directly. my goal here is to start passing multipart forms with files through this, but i realized i can't even send a simple var.

on my php side i just have :

<? print_r($_POST); ?>
(which prints all the POST vars...)

when i do

HTTPX.Request.Body = yeah=okay

my response :

Array
(
)

when i use the formpost:

HTTPX.Request.FormPost.Add( yeah , okay )

my response:
Array
(
[yeah] => okay
)


i know i've done this before but i can't figure out why this isn't working.. any suggestions?

Re: setting request.body

by steve, Tuesday, December 22, 2009, 05:52 (5449 days ago) @ steve

it seems i'm not setting the content-type header how do i do that?

Re: setting request.body

by woddrazen, Tuesday, December 22, 2009, 09:42 (5449 days ago) @ steve

Hi Steve,


You can add Content-Type inside wodHttpDLX Headers collection.

Here is example:
[code]wodHttp1.Request.Headers.Add Content-Type , Content-Type_value [/code]
Let us know how it goes.


Regards,
Drazen