Shoutbox

[?] Send using POST : httpwebrequests - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [?] Send using POST : httpwebrequests (/showthread.php?tid=75061)

[?] Send using POST : httpwebrequests by roflmao456 on 06-04-2007 at 10:43 PM

How do i send stuff using POST in httpwebrequests?

i'm confused on what to do


i tried changing

code:
httpwr.open("GET" [...]

to

code:
httpwr.open("POST" [...]

but it does not work :(
RE: [?] Send using POST : httpwebrequests by felipEx on 06-05-2007 at 02:22 AM

look at Twitter Plus source  :D


RE: [?] Send using POST : httpwebrequests by roflmao456 on 06-05-2007 at 02:42 AM

quote:
Originally posted by felipEx
look at Twitter Plus source  :D

it didn't work :(
RE: [?] Send using POST : httpwebrequests by markee on 06-05-2007 at 03:33 AM

just replacing "GET" with "POST" should work, but to actually post data then you will have to look at the source code of the likes of Twitter Plus or something to see how it is done.  Maybe you are trying to post the incorrect way, would you mind giving us some more information to be able to help?


RE: [?] Send using POST : httpwebrequests by felipEx on 06-05-2007 at 04:18 AM

it works fine for me :)

code:
<?php
foreach($_POST as $nombre_campo => $valor){
    echo "Var " . $nombre_campo . " = $valor \n";
}
?>


code:
function OnEvent_Initialize(MessengerStart){
    var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    xmlHttp.open("POST", "http://felipex.net/test_posting.php");
    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttp.send("a=1&b=2&c=3");

xmlHttp.onreadystatechange = function(){
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
    Debug.Trace("Response: \n" + xmlHttp.responseText);
} else {
    // Error...
    }
}
}

}


RE: [?] Send using POST : httpwebrequests by Volv on 06-05-2007 at 06:47 AM

My Plus!Mail script uses a technique similar to felipEx's and it works fine...