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
feature: add '--- curl_options' and '--- curl_protocol' section #125
feature: add '--- curl_options' and '--- curl_protocol' section #125
Conversation
Hi @woodgear, documentation is needed here |
The Test::Nginx document is in pod format (check https://perldoc.perl.org/perlpod for help), and the documentation for these two new options can be just added to the current .pm file like other options |
d11b980
to
aa36c13
Compare
update to add doc。 not sure I'm doing it right. |
lib/Test/Nginx/Socket.pm
Outdated
@@ -2993,6 +3003,14 @@ C<--- raw_request>. | |||
|
|||
See also the L<TEST_NGINX_USE_HTTP2> system environment for the "http2" test mode. | |||
|
|||
=head2 curl_options | |||
|
|||
add curl options when use 'curl' to send request. |
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.
Add extra command line options when using 'curl' to send request
should be better here
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.
And, you can give a useful example here
lib/Test/Nginx/Socket.pm
Outdated
|
||
=head2 curl_protocol | ||
|
||
set protocol such as http/https when use 'curl' to send request. |
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.
Set protocol (such as http/https) when sending request using 'curl'
may be better here
aa36c13
to
5047fb2
Compare
update |
… could combine with '--- http2' to construct a request by curl.
5047fb2
to
cf5d91d
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.
LGTM
when will this pr merge? |
Merged with minor tweaks, thanks for the contribution! diff --git a/lib/Test/Nginx/Socket.pm b/lib/Test/Nginx/Socket.pm
index 6901192..398fbd8 100644
--- a/lib/Test/Nginx/Socket.pm
+++ b/lib/Test/Nginx/Socket.pm
@@ -3011,7 +3011,7 @@ Set protocol (such as http/https) when sending request using 'curl'.
Add extra command line options when using 'curl' to send request.
-Below example will send https request via curl:
+Below is an example for sending an insecure https request using 'curl':
--- http2
--- curl_options: -k |
cool ^_^. |
feature: add '--- curl_options' and '--- curl_protocol' section which could combine with '--- http2' to construct a request by curl.