Improved querystring import on paste (#110)

This commit is contained in:
Gregory Schier
2024-09-25 08:03:19 -07:00
committed by GitHub
parent de7097ff1d
commit 7d97404c11
5 changed files with 36 additions and 25 deletions

View File

@@ -323,10 +323,11 @@ export const RequestPane = memo(function RequestPane({
url={activeRequest.url}
method={activeRequest.method}
placeholder="https://example.com"
onPaste={(text) => {
onPasteOverwrite={(text) => {
if (text.startsWith('curl ')) {
importCurl.mutate({ overwriteRequestId: activeRequestId, command: text });
} else {
// Only import query if pasted text contains entire querystring
importQuerystring.mutate(text);
}
}}