success sends the response payload for an in-progress invocation. Notes: - An invoke is not complete until next() is called again!
(body io.Reader, contentType string)
| 66 | // Notes: |
| 67 | // - An invoke is not complete until next() is called again! |
| 68 | func (i *invoke) success(body io.Reader, contentType string) error { |
| 69 | defer i.client.pool.Put(i.payload) |
| 70 | defer i.payload.Reset() |
| 71 | |
| 72 | url := i.client.baseURL + i.id + "/response" |
| 73 | return i.client.post(url, body, contentType, nil) |
| 74 | } |
| 75 | |
| 76 | // failure sends the payload to the Runtime API. This marks the function's invoke as a failure. |
| 77 | // Notes: |