From 501ad427eae2b64047cddc29309f68f0ecc9919a Mon Sep 17 00:00:00 2001 From: Kim Jin Yeon Date: Mon, 19 Jun 2023 17:13:19 +0900 Subject: [PATCH 1/5] add information about curl -F option without outer quote #4510 What this PR does / why we need it: Add information about problem with curl -F option without outer quote for curl 7.56.0 and higher versions. #4510 Which issue(s) this PR closes: https://github.com/IQSS/dataverse/issues/4510 Special notes for your reviewer: None. Suggestions on how to test this: None. Does this PR introduce a user interface change? If mockups are available, please link/include them here: No. Is there a release notes update needed for this change?: No. Additional documentation: --- doc/sphinx-guides/source/api/getting-started.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/sphinx-guides/source/api/getting-started.rst b/doc/sphinx-guides/source/api/getting-started.rst index c465b726421..8106ae15650 100644 --- a/doc/sphinx-guides/source/api/getting-started.rst +++ b/doc/sphinx-guides/source/api/getting-started.rst @@ -52,6 +52,20 @@ If you ever want to check an environment variable, you can "echo" it like this: echo $SERVER_URL +With curl version 7.56.0 and higher, it is recommended to use --form-string with outer quote rather than -F flag without outer quote. + +For example, curl command parameter below might cause error such as ``warning: garbage at end of field specification: ,"categories":["Data"]}``. + +.. code-block:: bash + + -F jsonData={\"description\":\"My description.\",\"categories\":[\"Data\"]} + +Instead, use --from-string with outer quote. See https://github.com/curl/curl/issues/2022 + +.. code-block:: bash + + --from-string 'jsonData={"description":"My description.","categories":["Data"]}' + If you don't like curl, don't have curl, or want to use a different programming language, you are encouraged to check out the Python, Javascript, R, and Java options in the :doc:`client-libraries` section. .. _curl: https://curl.haxx.se From d770c92b6d89b77b38b96125e0dc7920b20b7d70 Mon Sep 17 00:00:00 2001 From: Kim Jin Yeon Date: Tue, 20 Jun 2023 08:11:39 +0900 Subject: [PATCH 2/5] Update doc/sphinx-guides/source/api/getting-started.rst fix --form-string to --from-string Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/api/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/api/getting-started.rst b/doc/sphinx-guides/source/api/getting-started.rst index 8106ae15650..730b44cc12f 100644 --- a/doc/sphinx-guides/source/api/getting-started.rst +++ b/doc/sphinx-guides/source/api/getting-started.rst @@ -60,7 +60,7 @@ For example, curl command parameter below might cause error such as ``warning: g -F jsonData={\"description\":\"My description.\",\"categories\":[\"Data\"]} -Instead, use --from-string with outer quote. See https://github.com/curl/curl/issues/2022 +Instead, use --form-string with outer quote. See https://github.com/curl/curl/issues/2022 .. code-block:: bash From 2c0c5e9eaafcfd33f4944ace04f4db17c72c3f09 Mon Sep 17 00:00:00 2001 From: Kim Jin Yeon Date: Tue, 20 Jun 2023 08:11:49 +0900 Subject: [PATCH 3/5] Update doc/sphinx-guides/source/api/getting-started.rst fix --form-string to --from-string Co-authored-by: Philip Durbin --- doc/sphinx-guides/source/api/getting-started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sphinx-guides/source/api/getting-started.rst b/doc/sphinx-guides/source/api/getting-started.rst index 730b44cc12f..544f0921bd7 100644 --- a/doc/sphinx-guides/source/api/getting-started.rst +++ b/doc/sphinx-guides/source/api/getting-started.rst @@ -64,7 +64,7 @@ Instead, use --form-string with outer quote. See https://github.com/curl/curl/is .. code-block:: bash - --from-string 'jsonData={"description":"My description.","categories":["Data"]}' + --form-string 'jsonData={"description":"My description.","categories":["Data"]}' If you don't like curl, don't have curl, or want to use a different programming language, you are encouraged to check out the Python, Javascript, R, and Java options in the :doc:`client-libraries` section. From 0543becd9578eaf88bacf0b8d4f667306aa275e6 Mon Sep 17 00:00:00 2001 From: Kim Jin Yeon Date: Tue, 20 Jun 2023 08:18:15 +0900 Subject: [PATCH 4/5] [FIX] fix --form-string to --from-string fix --form-string to --from-string --- doc/sphinx-guides/source/api/getting-started.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sphinx-guides/source/api/getting-started.rst b/doc/sphinx-guides/source/api/getting-started.rst index 544f0921bd7..844ab25abda 100644 --- a/doc/sphinx-guides/source/api/getting-started.rst +++ b/doc/sphinx-guides/source/api/getting-started.rst @@ -52,7 +52,7 @@ If you ever want to check an environment variable, you can "echo" it like this: echo $SERVER_URL -With curl version 7.56.0 and higher, it is recommended to use --form-string with outer quote rather than -F flag without outer quote. +With curl version 7.56.0 and higher, it is recommended to use --from-string with outer quote rather than -F flag without outer quote. For example, curl command parameter below might cause error such as ``warning: garbage at end of field specification: ,"categories":["Data"]}``. @@ -60,11 +60,11 @@ For example, curl command parameter below might cause error such as ``warning: g -F jsonData={\"description\":\"My description.\",\"categories\":[\"Data\"]} -Instead, use --form-string with outer quote. See https://github.com/curl/curl/issues/2022 +Instead, use --from-string with outer quote. See https://github.com/curl/curl/issues/2022 .. code-block:: bash - --form-string 'jsonData={"description":"My description.","categories":["Data"]}' + --from-string 'jsonData={"description":"My description.","categories":["Data"]}' If you don't like curl, don't have curl, or want to use a different programming language, you are encouraged to check out the Python, Javascript, R, and Java options in the :doc:`client-libraries` section. From c3e655c483b4d8317bddde70666fb07696eeb451 Mon Sep 17 00:00:00 2001 From: Kim Jin Yeon Date: Wed, 21 Jun 2023 10:02:46 +0900 Subject: [PATCH 5/5] [FIX] fix --from-string --- doc/sphinx-guides/source/api/getting-started.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sphinx-guides/source/api/getting-started.rst b/doc/sphinx-guides/source/api/getting-started.rst index 844ab25abda..544f0921bd7 100644 --- a/doc/sphinx-guides/source/api/getting-started.rst +++ b/doc/sphinx-guides/source/api/getting-started.rst @@ -52,7 +52,7 @@ If you ever want to check an environment variable, you can "echo" it like this: echo $SERVER_URL -With curl version 7.56.0 and higher, it is recommended to use --from-string with outer quote rather than -F flag without outer quote. +With curl version 7.56.0 and higher, it is recommended to use --form-string with outer quote rather than -F flag without outer quote. For example, curl command parameter below might cause error such as ``warning: garbage at end of field specification: ,"categories":["Data"]}``. @@ -60,11 +60,11 @@ For example, curl command parameter below might cause error such as ``warning: g -F jsonData={\"description\":\"My description.\",\"categories\":[\"Data\"]} -Instead, use --from-string with outer quote. See https://github.com/curl/curl/issues/2022 +Instead, use --form-string with outer quote. See https://github.com/curl/curl/issues/2022 .. code-block:: bash - --from-string 'jsonData={"description":"My description.","categories":["Data"]}' + --form-string 'jsonData={"description":"My description.","categories":["Data"]}' If you don't like curl, don't have curl, or want to use a different programming language, you are encouraged to check out the Python, Javascript, R, and Java options in the :doc:`client-libraries` section.