D
David Billson
Hi all,
Fairly straight forward problem. I have a Post using HttpWebRequest
that posts data to a server. That server then posts data back to me.
Posting the data's not a problem, however I'm wondering if there is an
easy way to read back the variables that are returned. If not, I'm
left creating a parse routine which is not the end of the world but I
just want to be as programatically correct as I can be.
Code:
StreamReader sr = new StreamReader(HttpWResponse.GetResponseStream(),
System.Text.Encoding.ASCII);
//Convert the stream to a string
string s = sr.ReadToEnd();
sr.Close();
Response.Write(s);
RETURNS:
s ="trnApproved=1&trnId=10000843&messageId=1&messageText=Approved&authCode=TEST&errorType=N&errorFields=&avsProcessed=0&avsId=0&avsResult=0&avsAddrMatch=0&avsPostalMatch=0&avsMessage=Address+Verification+not+performed+for+this+transaction%2E"
I'd just like a way to read Request["trnApproved"] or
Request["messageText"] - Any ideas?
Thanks,
DB
Fairly straight forward problem. I have a Post using HttpWebRequest
that posts data to a server. That server then posts data back to me.
Posting the data's not a problem, however I'm wondering if there is an
easy way to read back the variables that are returned. If not, I'm
left creating a parse routine which is not the end of the world but I
just want to be as programatically correct as I can be.
Code:
StreamReader sr = new StreamReader(HttpWResponse.GetResponseStream(),
System.Text.Encoding.ASCII);
//Convert the stream to a string
string s = sr.ReadToEnd();
sr.Close();
Response.Write(s);
RETURNS:
s ="trnApproved=1&trnId=10000843&messageId=1&messageText=Approved&authCode=TEST&errorType=N&errorFields=&avsProcessed=0&avsId=0&avsResult=0&avsAddrMatch=0&avsPostalMatch=0&avsMessage=Address+Verification+not+performed+for+this+transaction%2E"
I'd just like a way to read Request["trnApproved"] or
Request["messageText"] - Any ideas?
Thanks,
DB