Added support for both POST and GET fetch endpoints.