Skip to content

Commit

Permalink
Merge pull request #2 from rodrigopires/master
Browse files Browse the repository at this point in the history
Encoding no StreamWriter/Reader
  • Loading branch information
marcbarbosa committed Mar 24, 2015
2 parents 1a13b2c + bd5dab9 commit e17d455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cielo/Helpers/HttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ private string Request(string pUrl, string pMethod, string pData)
Request.Method = pMethod;
Request.UserAgent = _UserAgent;

var Writer = new StreamWriter(Request.GetRequestStream());
var Writer = new StreamWriter(Request.GetRequestStream(), Encoding.GetEncoding(_CharSet));
Writer.Write(pData);
Writer.Close();
Writer.Dispose();

var Response = (HttpWebResponse)Request.GetResponse();
StreamReader Reader = new StreamReader(Response.GetResponseStream());
StreamReader Reader = new StreamReader(Response.GetResponseStream(), Encoding.GetEncoding(_CharSet));
Ret = Reader.ReadToEnd();
Reader.Close();
Reader.Dispose();
Expand Down

0 comments on commit e17d455

Please sign in to comment.