[
https://issues.apache.org/jira/browse/SOLR-18500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated SOLR-18500:
----------------------------------
Labels: pull-request-available (was: )
> 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: 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
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]