From 6394e5448c4383cf59a6250120868f5a51f83abd Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Wed, 29 Jan 2014 19:35:54 -0500 Subject: [PATCH 1/2] =?UTF-8?q?the=20verb=20wasn=E2=80=99t=20being=20set?= =?UTF-8?q?=20for=20web=20client,=20thus=20non=20GETs=20would=20probably?= =?UTF-8?q?=20always=20fail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/csharp/apiInvoker.mustache | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/csharp/apiInvoker.mustache b/src/main/resources/csharp/apiInvoker.mustache index c522d1545f6..2e20e3bbe5f 100644 --- a/src/main/resources/csharp/apiInvoker.mustache +++ b/src/main/resources/csharp/apiInvoker.mustache @@ -61,6 +61,7 @@ var client = WebRequest.Create(host + path + querystring); client.ContentType = "application/json"; + client.Method = method; foreach (var headerParamsItem in headerParams) { @@ -85,6 +86,7 @@ default: throw new ApiException(500, "unknown method type " + method); } + var webResponse = (HttpWebResponse) client.GetResponse(); if (webResponse.StatusCode != HttpStatusCode.OK) throw new ApiException((int) webResponse.StatusCode, webResponse.StatusDescription); From 8abb6521b46343412301bd339ce2f5fe5bcf2754 Mon Sep 17 00:00:00 2001 From: Danny Gershman Date: Wed, 29 Jan 2014 19:45:24 -0500 Subject: [PATCH 2/2] removed line break --- src/main/resources/csharp/apiInvoker.mustache | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/resources/csharp/apiInvoker.mustache b/src/main/resources/csharp/apiInvoker.mustache index 2e20e3bbe5f..8f1f0f43081 100644 --- a/src/main/resources/csharp/apiInvoker.mustache +++ b/src/main/resources/csharp/apiInvoker.mustache @@ -86,7 +86,6 @@ default: throw new ApiException(500, "unknown method type " + method); } - var webResponse = (HttpWebResponse) client.GetResponse(); if (webResponse.StatusCode != HttpStatusCode.OK) throw new ApiException((int) webResponse.StatusCode, webResponse.StatusDescription);