File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ function main(
51
51
52
52
const task = {
53
53
httpRequest : {
54
+ headers : {
55
+ 'Content-Type' : 'text/plain' ,
56
+ } ,
54
57
httpMethod : 'POST' ,
55
58
url,
56
59
} ,
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ function main(
51
51
52
52
const task = {
53
53
httpRequest : {
54
+ headers : {
55
+ 'Content-Type' : 'text/plain' ,
56
+ } ,
54
57
httpMethod : 'POST' ,
55
58
url,
56
59
oidcToken : {
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ function main(
48
48
49
49
const task = {
50
50
appEngineHttpRequest : {
51
+ headers : {
52
+ 'Content-Type' : 'text/plain' ,
53
+ } ,
51
54
httpMethod : 'POST' ,
52
55
relativeUri : '/log_payload' ,
53
56
} ,
@@ -66,12 +69,14 @@ function main(
66
69
67
70
console . log ( 'Sending task:' ) ;
68
71
console . log ( task ) ;
72
+
69
73
// Send create task request.
70
74
const request = { parent : parent , task : task } ;
71
75
const [ response ] = await client . createTask ( request ) ;
72
76
const name = response . name ;
73
77
console . log ( `Created task ${ name } ` ) ;
74
78
}
79
+
75
80
createTask ( ) ;
76
81
// [END cloud_tasks_appengine_create_task]
77
82
}
You can’t perform that action at this time.
0 commit comments