Minor new Meddler version (v2.1.0.1)
I’ve posted a new version of Meddler that makes getting query string parameters simpler.
import Meddler;
import System;
import System.Net.Sockets;
import System.Windows.Forms;
class Handlers
{
static function OnConnection(oSession: Session)
{
if (oSession.ReadRequest()){
System.Windows.Forms.MessageBox.Show(oSession.GetQueryParams()["AA"]);
}
oSession.socket.Shutdown(SocketShutdown.Send);
oSession.socket.Close();
}
}
//Try with the following URL http://localhost:8088/ThisIsAPage.htm?AA=1234&bb=5678&AA=910
import Meddler;
import System;
import System.Net.Sockets;
import System.Windows.Forms;
class Handlers
{
static function OnConnection(oSession: Session)
{
if (oSession.ReadRequest()){
System.Windows.Forms.MessageBox.Show(oSession.GetQueryParams()["AA"]);
}
oSession.socket.Shutdown(SocketShutdown.Send);
oSession.socket.Close();
}
}
//Try with the following URL http://localhost:8088/ThisIsAPage.htm?AA=1234&bb=5678&AA=910
0 Comments:
Post a Comment
<< Home