You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writer.WriteLine(" <URI> URI to send the request to. Leaving the protocol off the URI defaults to https://");
150
+
writer.WriteLine("");
151
+
writer.WriteLine("Options:");
152
+
foreach(varoptioninOptions.GetOptionHelp())
153
+
{
154
+
writer.Write(" ");
155
+
writer.WriteLine(option);
156
+
}
157
+
writer.WriteLine("");
158
+
writer.WriteLine("Content:");
159
+
writer.WriteLine("Repeat as many content arguments to create content sent with the HTTP request. Alternatively pipe raw content send as the HTTP request content.");
yieldreturn"--form Renders the content arguments as application/x-www-form-urlencoded";
371
+
yieldreturn"--help Show command line help.";
372
+
yieldreturn"--ignore-certificate Prevents server certificate validation.";
373
+
yieldreturn"--json Renders the content arguments as application/json.";
374
+
yieldreturn"--timeout <VALUE> Sets the timeout of the request using System.TimeSpan.TryParse (https://docs.microsoft.com/en-us/dotnet/api/system.timespan.parse)";
375
+
yieldreturn"--version Displays the application verison.";
376
+
yieldreturn"--xml <ROOT_NAME> Renders the content arguments as application/xml using the optional xml root name.";
377
+
}
378
+
313
379
publicstaticOptionsParse(IEnumerable<string>args)
314
380
{
315
381
varrequestContentType=ContentType.Json;
316
382
varxmlRootName=default(string);
317
383
varignoreCertificate=false;
318
384
vartimeout=default(TimeSpan?);
385
+
varhelp=false;
386
+
varversion=false;
319
387
foreach(vararginargs)
320
388
{
321
389
if(arg.StartsWith("--json"))
@@ -359,8 +427,16 @@ public static Options Parse(IEnumerable<string> args)
0 commit comments