Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quote the full URL in cURL commands (#5566)
Motivation: When copying a request as a cURL command in DocService, only the URL path is quoted. For example, `curl http://localhost:8080'/foo/bar'`. It would be better to quote the full URL, like `curl 'http://localhost:8080/foo/bar'`. Modifications: - Add quotes and call `escapeSingleQuote()` only when constructing the final URL Result: - The copied cURL command has the full URL quoted Tested the following outputs: - `curl [...] 'http://localhost:8080/foo/bar'` - `curl [...] 'http://localhost:8080/foo/bar?qwe=asd'` - `curl [...] 'http://localhost:8080/foo/bar?qwe="asd"'` - `curl [...] 'http://localhost:8080/foo/bar?qwe='\''asd'\'''`
- Loading branch information