getToken on all types of REST requests.