File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ module.exports = function (source, options) {
3636 }
3737 code . push ( util . format ( '%s%s' , opts . short ? '' : '--url ' , formattedUrl ) )
3838
39+ if ( opts . insecureSkipVerify ) {
40+ code . push ( opts . short ? '-k' : '--insecure' )
41+ }
42+
3943 if ( source . httpVersion === 'HTTP/1.0' ) {
4044 code . push ( opts . short ? '-0' : '--http1.0' )
4145 }
Original file line number Diff line number Diff line change @@ -55,6 +55,16 @@ module.exports = function (HTTPSnippet, fixtures) {
5555 result . should . eql ( "curl --request GET --url 'http://mockbin.com/har?foo%5Bbar%5D=baz%2Czap&fiz=buz&key=value'" )
5656 } )
5757
58+ it ( 'should support insecureSkipVerify' , function ( ) {
59+ const result = new HTTPSnippet ( fixtures . requests . https ) . convert ( 'shell' , 'curl' , {
60+ indent : false ,
61+ insecureSkipVerify : true
62+ } )
63+
64+ result . should . be . a . String ( )
65+ result . should . eql ( 'curl --request GET --url https://mockbin.com/har --insecure' )
66+ } )
67+
5868 it ( 'should use --http1.0 for HTTP/1.0' , function ( ) {
5969 const result = new HTTPSnippet ( fixtures . curl . http1 ) . convert ( 'shell' , 'curl' , {
6070 indent : false
You can’t perform that action at this time.
0 commit comments