Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
recurls
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
recurls
Commits
b415bd42
Commit
b415bd42
authored
Apr 05, 2023
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: Allow to select any curl binary with nice default
parent
ec0bf12b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/recurlests/cli.py
src/recurlests/cli.py
+3
-2
No files found.
src/recurlests/cli.py
View file @
b415bd42
...
@@ -5,9 +5,10 @@ from . import recurlests
...
@@ -5,9 +5,10 @@ from . import recurlests
@
click
.
command
(
short_help
=
"Runs curl's wrapper recurl"
)
@
click
.
command
(
short_help
=
"Runs curl's wrapper recurl"
)
@
click
.
option
(
'--headers/--no-headers'
,
help
=
"Shows response headers"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--headers/--no-headers'
,
help
=
"Shows response headers"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--output/--no-output'
,
help
=
"Shows the output"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--output/--no-output'
,
help
=
"Shows the output"
,
default
=
False
,
show_default
=
True
)
@
click
.
option
(
'--curl'
,
help
=
"Path to curl binary"
,
default
=
'curl'
,
show_default
=
True
)
@
click
.
argument
(
"url"
)
@
click
.
argument
(
"url"
)
def
runRecurl
(
headers
,
output
,
url
):
def
runRecurl
(
headers
,
output
,
curl
,
url
):
mimikra
=
recurlests
.
Recurlests
()
mimikra
=
recurlests
.
Recurlests
(
curl
)
response
=
mimikra
.
get
(
url
)
response
=
mimikra
.
get
(
url
)
print
(
'Effective HTTP version:'
,
response
.
effective_http_version
)
print
(
'Effective HTTP version:'
,
response
.
effective_http_version
)
print
(
'Response status code:'
,
response
.
status_code
)
print
(
'Response status code:'
,
response
.
status_code
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment