diff --git a/src/RPXLib.Tests/RPXLib.Tests.csproj b/src/RPXLib.Tests/RPXLib.Tests.csproj index 6042864..c58edcb 100644 --- a/src/RPXLib.Tests/RPXLib.Tests.csproj +++ b/src/RPXLib.Tests/RPXLib.Tests.csproj @@ -120,4 +120,4 @@ --> - \ No newline at end of file + diff --git a/src/RPXLib/RPXApiWrapper.cs b/src/RPXLib/RPXApiWrapper.cs index fb3d228..22fd1d4 100644 --- a/src/RPXLib/RPXApiWrapper.cs +++ b/src/RPXLib/RPXApiWrapper.cs @@ -42,7 +42,7 @@ public string ApiKey public XElement Call(string methodName, IDictionary queryData) { string postData = GeneratePostData(queryData); - Uri requestUri = new Uri(BaseUrl + methodName); + Uri requestUri = new Uri(BaseUrl + methodName + "?" + postData); HttpWebRequest request = BuildApiWebRequest(requestUri, postData); @@ -59,19 +59,10 @@ public XElement Call(string methodName, IDictionary queryData) private HttpWebRequest BuildApiWebRequest(Uri requestUri, string postData) { HttpWebRequest apiWebRequest = (HttpWebRequest) WebRequest.Create(requestUri); - apiWebRequest.Method = "POST"; - apiWebRequest.ContentType = "application/x-www-form-urlencoded"; - apiWebRequest.ContentLength = postData.Length; if (webProxy != null) apiWebRequest.Proxy = webProxy; - // Write the request - using (var stOut = new StreamWriter(apiWebRequest.GetRequestStream(), Encoding.ASCII)) - { - stOut.Write(postData); - stOut.Close(); - } return apiWebRequest; } @@ -96,4 +87,4 @@ private string GeneratePostData(IDictionary partialQuery) return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/RPXLib/RPXLib.csproj b/src/RPXLib/RPXLib.csproj index 7fce0fe..296a4c3 100644 --- a/src/RPXLib/RPXLib.csproj +++ b/src/RPXLib/RPXLib.csproj @@ -137,4 +137,4 @@ --> - \ No newline at end of file +