Hi, 

Looking at this post <https://github.com/googleapis/nodejs-tasks/issues/248> 
with a similar symptom, it appears that the root cause could be a missing 
HTTP header for the content-type, which should be set to either 
"application/octet-stream" 
or "application/json" 
<https://cloud.google.com/tasks/docs/reference/rest/v2beta3/projects.locations.queues.tasks#:~:text=default%20is%20POST.-,headers,-map%20(key:%20string>
 
depending on the type of content you are passing in your request. 

Based on the above, I suggest adding the header for content-type if it's 
currently missing then trying again. A code sample can be seen in our 
documentation 
<https://cloud.google.com/tasks/docs/creating-appengine-handlers#node.js> 
and was also provided in this user's comment 
<https://github.com/googleapis/nodejs-tasks/issues/248#issuecomment-505530483>
.

On Wednesday, March 30, 2022 at 1:32:31 PM UTC-4 
rajesh...@veersoftsolutions.com wrote:

> Hi, I am following
> https://github.com/googleapis/nodejs-tasks/tree/main/samples 
> <https://mailtrack.io/trace/link/c46449dfca63c0167e638b37cc3be018d83443eb?url=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fnodejs-tasks%2Ftree%2Fmain%2Fsamples&userId=6615365&signature=f474ef508b0ea7dd>
>
> I have deployed the above to a remote server.
>
> server.js - I am using /log_payload to test as both an 
> appengineTaskHandler and HttpTaskHandler
>
> If I am using it as an AppengineTaskHandler from createTask.js - It is all 
> fine.
>
> If I am using  'xyz.appspot.com/log_payload' as a url in HttpTaskHandler 
> example - createHttpTask.js, then the payload is coming as empty.
>
> -- 
> Support Team
> www.servicefolder.com 
> <https://mailtrack.io/trace/link/0bbbef6930112598a5b730ba6bc278d39f72a8d0?url=https%3A%2F%2Fwww.servicefolder.com&userId=6615365&signature=9aef1aeda404800f>
> *Field Service Software on Google Cloud Platform and Mobile*
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/24fa7c4a-a3ff-4f57-9665-d8569ca2cd30n%40googlegroups.com.

Reply via email to