File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ function main(
5151
5252 const task = {
5353 httpRequest : {
54+ headers : {
55+ 'Content-Type' : 'text/plain' ,
56+ } ,
5457 httpMethod : 'POST' ,
5558 url,
5659 } ,
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ function main(
5151
5252 const task = {
5353 httpRequest : {
54+ headers : {
55+ 'Content-Type' : 'text/plain' ,
56+ } ,
5457 httpMethod : 'POST' ,
5558 url,
5659 oidcToken : {
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ function main(
4848
4949 const task = {
5050 appEngineHttpRequest : {
51+ headers : {
52+ 'Content-Type' : 'text/plain' ,
53+ } ,
5154 httpMethod : 'POST' ,
5255 relativeUri : '/log_payload' ,
5356 } ,
@@ -66,12 +69,14 @@ function main(
6669
6770 console . log ( 'Sending task:' ) ;
6871 console . log ( task ) ;
72+
6973 // Send create task request.
7074 const request = { parent : parent , task : task } ;
7175 const [ response ] = await client . createTask ( request ) ;
7276 const name = response . name ;
7377 console . log ( `Created task ${ name } ` ) ;
7478 }
79+
7580 createTask ( ) ;
7681 // [END cloud_tasks_appengine_create_task]
7782}
You can’t perform that action at this time.
0 commit comments