i trying integrate third-party system , in documentation mentions when send xml data via httppost, use "text/xml charset=\"utf-8**"" "content-type", , in other cases use "**application/x-www.form-urlencoded" content-type.
would there differences in parsing request? right pull post data using folllowing code:
streamreader reader = new streamreader(request.inputstream); string xmldata = reader.readtoend();
when open stream reader, should pass encoding specified on httprequest object.
streamreader reader = new streamreader(request.inputstream, request.contentencoding); string xmldata = reader.readtoend();
this should allow original contents of request proper .net string regardless of whatever encoding used.
Comments
Post a Comment