Updated to use the new requestWithMethod method