NewPOSTTask creates a Task that will POST to a path with the given form data.
(path string, params url.Values)
| 138 | |
| 139 | // NewPOSTTask creates a Task that will POST to a path with the given form data. |
| 140 | func NewPOSTTask(path string, params url.Values) *Task { |
| 141 | h := make(http.Header) |
| 142 | h.Set("Content-Type", "application/x-www-form-urlencoded") |
| 143 | return &Task{ |
| 144 | Path: path, |
| 145 | Payload: []byte(params.Encode()), |
| 146 | Header: h, |
| 147 | Method: "POST", |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | // RequestHeaders are the special HTTP request headers available to push task |
| 152 | // HTTP request handlers. These headers are set internally by App Engine. |