mirror of
https://github.com/google/nomulus.git
synced 2025-07-31 23:16:31 +02:00
Make TaskMatcher default to POST methods (#1418)
* Make TaskMatcher default to POST methods TaskOptions.Builder.withUrl() defaults to POST methods. Therefore, it seems reasonable to verify that task queue methods are using the POST method, especially given that the method must now be identified explicitly when using CloudTaskUtils. This check would have guarded against the bug fixed by #1413. * Elaborate on comment * Further improved the comment
This commit is contained in:
parent
52550a9251
commit
b4b318f923
1 changed files with 6 additions and 1 deletions
|
@ -188,7 +188,12 @@ public class CloudTasksHelper implements Serializable {
|
|||
|
||||
String taskName;
|
||||
String service;
|
||||
HttpMethod method;
|
||||
// App Engine TaskOption methods default to "POST". This isn't obvious from the code, so we
|
||||
// default it to POST here so that we don't accidentally create an entry with a GET method when
|
||||
// converting to CloudTaskUtils, which requires that the method be specified explicitly.
|
||||
// Should we ever actually want to do a GET, we'll likewise have to set this explicitly for the
|
||||
// tests.
|
||||
HttpMethod method = HttpMethod.POST;
|
||||
String url;
|
||||
Multimap<String, String> headers = ArrayListMultimap.create();
|
||||
Multimap<String, String> params = ArrayListMultimap.create();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue