Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41a97a1

Browse files
authored
1 parent 83db9e7 commit 41a97a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

appengine/flexible/tasks/create_app_engine_queue_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def create_task(project, queue, location, payload=None, in_seconds=None):
3939
# Construct the request body.
4040
task = {
4141
'app_engine_http_request': { # Specify the type of request.
42-
'http_method': 'POST',
42+
'http_method': tasks_v2.HttpMethod.POST,
4343
'relative_uri': '/example_task_handler'
4444
}
4545
}

appengine/flexible/tasks/snippets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def create_task(project, location, queue):
9090

9191
task = {
9292
'app_engine_http_request': {
93-
'http_method': 'POST',
93+
'http_method': tasks.HttpMethod.POST,
9494
'relative_uri': '/update_counter',
9595
'app_engine_routing': {
9696
'service': 'worker'
@@ -120,7 +120,7 @@ def create_tasks_with_data(project, location, queue):
120120

121121
task1 = {
122122
'app_engine_http_request': {
123-
'http_method': 'POST',
123+
'http_method': tasks.HttpMethod.POST,
124124
'relative_uri': '/update_counter?key=blue',
125125
'app_engine_routing': {
126126
'service': 'worker'
@@ -130,7 +130,7 @@ def create_tasks_with_data(project, location, queue):
130130

131131
task2 = {
132132
'app_engine_http_request': {
133-
'http_method': 'POST',
133+
'http_method': tasks.HttpMethod.POST,
134134
'relative_uri': '/update_counter',
135135
'app_engine_routing': {
136136
'service': 'worker'
@@ -165,7 +165,7 @@ def create_task_with_name(project, location, queue, task_name):
165165
task = {
166166
'name': client.task_path(project, location, queue, task_name),
167167
'app_engine_http_request': {
168-
'http_method': 'GET',
168+
'http_method': tasks.HttpMethod.GET,
169169
'relative_uri': '/url/path'
170170
}
171171
}

0 commit comments

Comments
 (0)