File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ parseArguments()
6767 fi
6868}
6969
70+ uriencode ()
71+ {
72+ jq -nr --arg v " $1 " ' $v|@uri' ;
73+ }
7074# ##############main############
7175
7276parseArguments " $@ "
@@ -88,6 +92,7 @@ param1="filter=policyType eq 'Standard'"
8892# ## To use filter page[limit] in URI, The key 'page[limit]' must be url encoded already. ###
8993# ## Curl --data-urlencode encodes only the content part of the data of the form 'name=content' ###
9094param2=" $( uriencode ' page[limit]' ) =10" # op: page%5Blimit%5D=10
95+ echo $param2
9196
9297# #############jobs##############
9398
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ uriencode()
7777parseArguments " $@ "
7878
7979basepath=" https://$master_server :$port /netbackup"
80- content_header=' content-type:application/json;charset=utf-8 '
80+ content_header=' content-type:application/json'
8181
8282# #############login#############
8383
@@ -99,7 +99,7 @@ param2="$(uriencode 'page[limit]')=10" #op: page%5Blimit%5D=10
9999auth_header=" authorization:$jwt "
100100uri=" $basepath /admin/jobs"
101101
102- curl --verbose -- insecure --request GET --get $uri -H $content_header -H $auth_header \
102+ curl --insecure --request GET --globoff --get $uri -H $content_header -H $auth_header \
103103 --data-urlencode " $param1 " \
104104 --data-urlencode " $param2 " \
105105 | \
You can’t perform that action at this time.
0 commit comments