-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paste curl modal #6384
Paste curl modal #6384
Conversation
8751175
to
9ab0e29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackkav there might be a small bug when pasting some curls they are incorrectly picked up as invalid, example:
curl --request POST \
--url 'http://mockbin.org/bin/c24b72a2-1aed-48a3-be2d-b6122e855333?foo=bar&foo=baz' \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--cookie 'foo=bar; bar=baz' \
--data foo=bar \
--data bar=baz
on the bottom. But if I add a space somewhere on the curl text in the modal, it becomes valid
@filfreire that's correct the validation check should be happening on paste as well as change. Could you give it a try for me please? |
@jackkav seems the problem is the isValid and the req start as |
|
||
const handleImportQueryFromUrl = useCallback(() => { | ||
useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jackkav I am wondering if there was a reason for this?
* remove pad left on pinned * refactor filter logic * first pass * always create new curl req * use terminal icon * fix from curl folder * wire up request create * fix paste curl in url bar * fix types * fix test * fix for initial draw isvalid check --------- Co-authored-by: Filipe Freire <[email protected]>
changelog(Fixes): Re-added a way to paste curl requests directly into URL bar.
fixes: #6338