curl --dry-run ?
#12953
Replies: 1 comment 2 replies
-
The whole idea seems like a bit of an abuse of curl. Are you sure you don't want to be using trurl for this?
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm looking for a sort of "dry-run" option for the curl binary where it processes all options but stops just short of actually making network connections.
The background for my question:
I'm abusing curl in a bash script to build a URI with proper escaping of variables with URL encoding. Those variables are a great feature, btw.
However, I do not need curl to make the connection, I need to present the URI to the user and ask them to login at that URI in their own browser as part of an oauth2 process.
I figured out I can trick curl into avoiding the actual connection by restricting the protocol like this:
$ curl --proto http -w '%{url}' --variable a=b 'https://example.com/{{a:url}}'
However this feels like an abuse of a security feature and I'm not sure how reliable this will be in the future.
Beta Was this translation helpful? Give feedback.
All reactions