[
https://issues.apache.org/jira/browse/SOLR-18500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132429#comment-18132429
]
ASF subversion and git services commented on SOLR-18500:
--------------------------------------------------------
Commit eb6a8e50b0e565d1ce922c85712a4b282b65d536 in solr's branch
refs/heads/main from Serhiy Bzhezytskyy
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=eb6a8e50b0e ]
SOLR-18500: Single-quote the URL in every curl example (#5120)
Co-authored-by: Eric Pugh <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
> Get our arms around single,double,no quote on curl commands
> -----------------------------------------------------------
>
> Key: SOLR-18500
> URL: https://issues.apache.org/jira/browse/SOLR-18500
> Project: Solr
> Issue Type: Sub-task
> Components: documentation
> Affects Versions: 10.0
> Reporter: Eric Pugh
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> We have a mix of single, double, and no quote pattenrs around urls for curl.
>
> for exmaple
>
> curl -X DELETE
> [http://localhost:8983/api/collections/techproducts_v2?async=aaaa]
>
> I think we should pick one.. I am jealous of the ncie formatting that
> opensearch has for it's "Copy as Curl" button that layers in the header and
> quote fomratting as needed!
>
> Could add to docs something like:
>
> === curl Commands
>
>
>
>
>
> Use `[source,bash]` blocks for curl examples and omit the shell prompt (`$`).
>
>
> Put the quoted URL after `curl`, followed by headers and the request body.
>
>
> When an explicit method is required, put `-X PUT`, `-X DELETE`, or another
> method immediately after `curl`, before the URL.
>
>
> Omit `-X GET` for ordinary GET requests and `-X POST` when `-d`, `--data`, or
> `--data-binary` already implies POST.
>
>
> Keep an explicit method when curl would otherwise use a different one, such
> as POST with `--upload-file`, which defaults to PUT.
>
>
>
>
>
> [source,bash]
>
>
> ----
>
>
> curl 'http://localhost:8983/solr/techproducts/schema'
>
>
> curl 'http://localhost:8983/solr/techproducts/schema' -H 'Content-Type:
> application/json' --data-binary '\{"delete-field":{"name":"sell_by"}}'
>
>
> curl -X PUT
> 'http://localhost:8983/api/collections/techproducts/schema/fields/sell_by' -H
> 'Content-Type: application/json' --data-binary
> '\{"type":"pdate","stored":true}'
>
>
> curl -X DELETE
> 'http://localhost:8983/api/collections/techproducts/schema/fields/sell_by'
>
>
> ----
>
>
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]