Have endpoint functions call api-request instead of request