client library for xhr requests