Add actions API.

- Factorize request in test.
- Simplify promisification.
- Wrap and fix HTTP errors.