code: func (d *Dispatcher) processHTTPRequest(c *router.Context) {
  	headers := taskqueue.ParseRequestHeaders(c.Request.Header)
  	body, err := ioutil.ReadAll(c.Request.Body)
  	if err != nil {
  		httpReply(c, false, 500, "Failed to read request body: %s", err)
  		return
  	}
  	logging.Debugf(c.Context, "Received task (exec count %d): %s", headers.TaskExecutionCount, body)
  
  	payload, err := deserializePayload(body)
  	if err != nil {
  		httpReply(c, false, 202, "Bad payload, can't deserialize: %s", err)
  		return
  	}
  
  	h, err := d.handler(payload)
  	if err != nil {
  		httpReply(c, false, 202, "Bad task: %s", err)
  		return
  	}
  
  	ctx := withRequestHeaders(c.Context, headers)
  	switch err = h.cb(ctx, payload); {
  	case err == nil:
  		httpReply(c, true, 200, "OK")
  	case Retry.In(err):
  		httpReply(c, false, 409, "The handler asked for retry: %s", err)
  	case transient.Tag.In(err):
  		httpReply(c, false, 500, "Transient error: %s", err)
  	default:
  		httpReply(c, false, 202, "Fatal error: %s", err)
  	}
  }
docs: // processHTTPRequest is invoked on each HTTP POST.
  //
  // It deserializes the task and invokes an appropriate callback. Finishes the
  // request with status 202 in case of a fatal error (to stop retries).