Sorry to bring up an unaswered thread, but I started playing about with
the again, and getting some progress, but i still cant find how to
replicate the post information sent by the browser using http:request,
it seems pretty close but without being able to find any documentation
I cant see what im doing wrong,<br>
<br>
http:request(post,{Url,[],"application/x-www-form-urlencoded","key1=var1&key2=var2"},[],[]).<br>
http:request(post,{Url,[],"application/x-www-form-urlencoded",<<"key1=var1&key2=var2">>},[],[]).<br>
<br>
are both throwing the same error<br>
Reason: {{badmatch,[{"key1","val1"},{"key2","val2"}]},[mymodule,out,1},{yaws_server,deliver_dyn_part,8 ....<br>
(mymodule:out/1 is just io:formatting arg for now)<br>
<br>
I assume its getting close as [{"key1","val1"},{"key2","val2"}] is the
format the post args come out when i parse_post data sent from an
actual post form.<br>
<br>
Ive scraped through the inets - http source code, without finding much
clues, and nothing on previous newletter / internet searches.<br>
also tried formatting the binary data sent when using an actual form<br>
<br>
 [{"key1","val1"},{"key2","val2"}] being sent prints out ->
<<107,101,121,49,61,118,97,108,49,38,107,101,121,50,61,118,97,108,50>>
as the post body<br>
<br>
but this wont binary_to_term, I also tried reverse engineering parse post, but having a hard time understanding it<br>