Fix curl examples to use GET with -d

Closes gh-1190
This commit is contained in:
Stephane Nicoll
2021-03-05 10:50:17 +01:00
parent 3844fb313f
commit e02633c862
3 changed files with 7 additions and 7 deletions

View File

@@ -872,7 +872,7 @@ those two ids are displayed in the capabilities of the service):
[source]
----
$ curl http://localhost:8080/starter.zip -d dependencies=web,devtools \
$ curl -G http://localhost:8080/starter.zip -d dependencies=web,devtools \
-d bootVersion=2.3.5.RELEASE -o my-project.zip
----

View File

@@ -1,13 +1,13 @@
To create a default demo.zip:
$ curl {{serviceUrl}}/starter.zip -o demo.zip
$ curl -G {{serviceUrl}}/starter.zip -o demo.zip
To create a web project using Java 11:
$ curl {{serviceUrl}}/starter.zip -d dependencies=web \
$ curl -G {{serviceUrl}}/starter.zip -d dependencies=web \
-d javaVersion=11 -o demo.zip
To create a web/data-jpa gradle project unpacked:
$ curl {{serviceUrl}}/starter.tgz -d dependencies=web,data-jpa \
$ curl -G {{serviceUrl}}/starter.tgz -d dependencies=web,data-jpa \
-d type=gradle-project -d baseDir=my-dir | tar -xzvf -
To generate a Maven POM with war packaging:
$ curl {{serviceUrl}}/pom.xml -d packaging=war -o pom.xml
$ curl -G {{serviceUrl}}/pom.xml -d packaging=war -o pom.xml

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,7 +88,7 @@ class CommandLineHelpGeneratorTests {
assertThat(content).contains("id-b | depB");
assertThat(content).contains("https://fake-service");
assertThat(content).contains("Examples:");
assertThat(content).contains("curl https://fake-service");
assertThat(content).contains("curl -G https://fake-service");
}
@Test