Request. begingetrequeststream error! The body of the content with this predicate type cannot be sent.
Note This method:
///// Request. method = "get"; // this method is called if it is not asynchronous.
Request. method = "Post"; // this method is called if it is asynchronous.
Try
{
Request = webrequest. Create (string. Format (geturi, weburi, betinfor. Row. playid, uid, ptype, gnum) as httpwebrequest;
///// Request. method = "get"; // this method is called if it is not asynchronous.
Request. method = "Post"; // this method is called if it is asynchronous.
Request. keepalive = true;
Request. Timeout = 400;
If (betinfor. playmode = playmode. Go)
Request. Referer = string. Format ("{0} APP/member/bk_browse/body_browse.php? Uid = {1} & Rtype = Re & langx = ZH-CN & mtype = 3 & delay = ", weburi, UID );
Else if (betinfor. playmode = playmode. Single)
Request. Referer = string. Format ("{0} APP/member/bk_browse/body_browse.php? Uid = {1} & Rtype = R & langx = ZH-CN & mtype = 3 & delay = ", weburi, UID );
Request. useragent = "MSIE 6.0 ";
//************************************** * *** Asynchronous call
Request. begingetrequeststream (New asynccallback (requestcallback), request );
Alldone. waitone ();
Response = (httpwebresponse) request. getresponse ();
Stream = response. getresponsestream ();
Thread. Sleep (1 );
Streamreader streamread = new streamreader (stream, big5 );
Result = streamread. readtoend ();
Stream. Close ();
Streamread. Close ();
//************************************** ********************
///// Response = request. getresponse () as httpwebresponse;
///// Stream = response. getresponsestream ();
///// Streamreader sr = NULL;
///// Sr = new streamreader (stream, big5 );
//// While (COUNT = Sr. Read (leftbuffer, 0, leftbuffer. Length)> 0)
//////{
//// String STR = new string (leftbuffer, 0, count );
///// Leftsb. append (STR );
//////}
//// Sr. Close ();
# Region extract data
//// Result = leftsb. tostring ();
If (result. indexof ("medium ")! =-1 | betinfor. playmode = playmode. Single)
{
}
# Endregion
}
Catch (exception e) {Throw new exception ("exception occurred when obtaining the left side" + Result + E. message + "," + E. targetsite + "," + E. innerexception );}
Finally
{
If (response! = NULL) response. Close ();
If (request! = NULL) request. Abort ();
Leftsb. Remove (0, leftsb. Length );
}
If (! String. isnullorempty (gmin_single) & (INT) (betinfor. odds + 0.0001) * 1000) % 10 = 0) // a ticket with a decimal number of 3rd digits will be canceled
{
}
Else betinfor. Odds = 0;
Time2 = environment. tickcount;
Betinfor. gettime = time2-time1;
Return result;