Copy as cURL should fix case of verbs to uppercase
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 379
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
In sense I can write this and it executes fine:
put _snapshot/local-data/data
{ "indices" : "logstash-*"
}
But if I "Copy as cURL" the *_resulting statement retains the lowercase put *_which then fails to execute
curl -Xput "http://localhost:9200/_snapshot/local-kibana/kibana" -d'
> { "indices" : ".kibana"
> }'
{"error":{"root_cause":[{"type":"snapshot_missing_exception","reason":"[local-kibana:kibana] is missing"}],"type":"snapshot_missing_exception","reason":"[local-kibana:kibana] is missing","caused_by":{"type":"no_such_file_exception","reason":"/mnt/elk1/elasticsearch/snapshots/snap-kibana.dat"}},"status":404}
Would be good if the Copy as cURL could fix this, and maybe just make Sense autofix verbs to uppercase regardless as this seems to be a common cause of issues (c.f. #133 #85)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Sense “Copy as cURL” action and trace how request verbs are parsed and emitted. Check any existing tests for request formatting, then verify that lowercase verbs produce uppercase verbs in copied cURL output and that the proposed editor behavior is covered if included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100