Minimal ajax library for JSON requests that returns a Promise.