@@ -62,13 +62,13 @@ If you like this project, learn something or you are using it in your applicatio
6262### ** Post Method** sample code (it will be written in the ** console** ):
6363```
6464 string requestBody = @"{""name"":""amin"",""requestId"":""10001000"",""amount"":10000}";
65- string requestUri = "/ api/test";
65+ string requestUri = "api/test";
6666 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, requestUri);
6767 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
6868 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
6969
7070 using var httpClient = new HttpClient();
71- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
71+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
7272
7373 httpClient.GenerateCurlInConsole(
7474 httpRequestMessage,
@@ -85,7 +85,7 @@ If you like this project, learn something or you are using it in your applicatio
8585### ** Post Method** sample code for FormUrlEncodedContent (it will be written in the ** console** ):
8686```
8787 string requestBody = @"{""name"":""justin"",""requestId"":10001026,""amount"":26000}";
88- string requestUri = "/ api/test";
88+ string requestUri = "api/test";
8989 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, requestUri);
9090 httpRequestMessage.Content = new FormUrlEncodedContent(new[]
9191 {
@@ -95,7 +95,7 @@ If you like this project, learn something or you are using it in your applicatio
9595 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
9696
9797 using var httpClient = new HttpClient();
98- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
98+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
9999
100100 httpClient.GenerateCurlInConsole(
101101 httpRequestMessage,
@@ -120,12 +120,12 @@ If you like this project, learn something or you are using it in your applicatio
120120 <amount>240000</amount>
121121 </Order>";
122122
123- var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, "/ api/test");
123+ var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, "api/test");
124124 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
125125 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
126126
127127 using var httpClient = new HttpClient();
128- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
128+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
129129
130130 httpClient.GenerateCurlInConsole(
131131 httpRequestMessage,
@@ -148,13 +148,13 @@ If the filename variable is null or empty, then the current date will be set for
148148 string path = string.Empty;
149149 string filename = "PostMethodResult" ;
150150 string requestBody = @"{""name"":""sara"",""requestId"":""10001001"",""amount"":20000}";
151- string requestUri = "/ api/test";
151+ string requestUri = "api/test";
152152 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, requestUri);
153153 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
154154 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
155155
156156 using var httpClient = new HttpClient();
157- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
157+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
158158
159159 httpClient.GenerateCurlInFile(
160160 httpRequestMessage,
@@ -171,13 +171,13 @@ If the filename variable is null or empty, then the current date will be set for
171171
172172### ** Get Method** sample code (it will be written in the ** console** ):
173173```
174- string requestUri = "/ api/test";
174+ string requestUri = "api/test";
175175 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri);
176176 httpRequestMessage.Content = new StringContent(string.Empty, Encoding.UTF8, "application/json");
177177 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
178178
179179 using var httpClient = new HttpClient();
180- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
180+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
181181
182182 httpClient.GenerateCurlInConsole(
183183 httpRequestMessage,
@@ -199,13 +199,13 @@ If the filename variable is null or empty, then the current date will be set for
199199```
200200 string path = string.Empty;
201201 string filename = "GetMethodResult";
202- string requestUri = "/ api/test";
202+ string requestUri = "api/test";
203203 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, requestUri);
204204 httpRequestMessage.Content = new StringContent(string.Empty, Encoding.UTF8, "application/json");
205205 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
206206
207207 using var httpClient = new HttpClient();
208- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
208+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
209209
210210 httpClient.GenerateCurlInFile(
211211 httpRequestMessage,
@@ -223,13 +223,13 @@ If the filename variable is null or empty, then the current date will be set for
223223### ** Put Method** sample code (it will be written in the ** console** ):
224224```
225225 string requestBody = @"{""name"":""jadi"",""requestId"":""10001003"",""amount"":30000}";
226- string requestUri = "/ api/test";
226+ string requestUri = "api/test";
227227 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Put, requestUri);
228228 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
229229 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
230230
231231 using var httpClient = new HttpClient();
232- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
232+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
233233
234234 httpClient.GenerateCurlInConsole(
235235 httpRequestMessage,
@@ -252,13 +252,13 @@ If the filename variable is null or empty, then the current date will be set for
252252 string path = string.Empty;
253253 string filename = "PutMethodResult" ;
254254 string requestBody = @"{ ""name"" : ""reza"",""requestId"" : ""10001004"",""amount"":40000 }";
255- string requestUri = "/ api/test";
255+ string requestUri = "api/test";
256256 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Put, requestUri);
257257 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
258258 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
259259
260260 using var httpClient = new HttpClient();
261- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
261+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
262262
263263 httpClient.GenerateCurlInFile(
264264 httpRequestMessage,
@@ -276,13 +276,13 @@ If the filename variable is null or empty, then the current date will be set for
276276### ** Patch Method** sample code (it will be written in the ** console** ):
277277```
278278 string requestBody = @"{""name"":""hamed"",""requestId"":""10001005"",""amount"":50000}";
279- string requestUri = "/ api/test";
279+ string requestUri = "api/test";
280280 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Patch, requestUri);
281281 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
282282 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
283283
284284 using var httpClient = new HttpClient();
285- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
285+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
286286
287287 httpClient.GenerateCurlInConsole(
288288 httpRequestMessage,
@@ -305,13 +305,13 @@ If the filename variable is null or empty, then the current date will be set for
305305 string path = string.Empty;
306306 string filename = "PatchMethodResult" ;
307307 string requestBody = @"{ ""name"" : ""zara"",""requestId"" : ""10001006"",""amount"":60000 }";
308- string requestUri = "/ api/test";
308+ string requestUri = "api/test";
309309 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Patch, requestUri);
310310 httpRequestMessage.Content = new StringContent(requestBody, Encoding.UTF8, "application/json");
311311 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
312312
313313 using var httpClient = new HttpClient();
314- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
314+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
315315
316316 httpClient.GenerateCurlInFile(
317317 httpRequestMessage,
@@ -329,13 +329,13 @@ If the filename variable is null or empty, then the current date will be set for
329329### ** Delete Method** sample code (it will be written in the ** console** ):
330330```
331331 int id = 12;
332- string requestUri = $"/ api/test/{id}";
332+ string requestUri = $"api/test/{id}";
333333 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Delete, requestUri);
334334 httpRequestMessage.Content = new StringContent(string.Empty, Encoding.UTF8, "application/json");
335335 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
336336
337337 using var httpClient = new HttpClient();
338- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
338+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
339339
340340 httpClient.GenerateCurlInConsole(
341341 httpRequestMessage,
@@ -358,13 +358,13 @@ If the filename variable is null or empty, then the current date will be set for
358358 string path = string.Empty;
359359 string filename = "DeleteMethodResult";
360360 int id = 12;
361- string requestUri = $"/ api/test/{id}";
361+ string requestUri = $"api/test/{id}";
362362 var httpRequestMessage = new HttpRequestMessage(HttpMethod.Delete, requestUri);
363363 httpRequestMessage.Content = new StringContent(string.Empty, Encoding.UTF8, "application/json");
364364 httpRequestMessage.Headers.Add("Authorization", $"Bearer {Guid.NewGuid().ToString()}");
365365
366366 using var httpClient = new HttpClient();
367- httpClient.BaseAddress = new Uri("http://localhost:1213/v1");
367+ httpClient.BaseAddress = new Uri("http://localhost:1213/v1/ ");
368368
369369 httpClient.GenerateCurlInFile(
370370 httpRequestMessage,
0 commit comments