UPDATE: While Postman and browsers are able to receive valid response bodies from an Amazon API Gateway endpoint, other web applications are not. This is a basic GET request with no headers, and no authentication is needed for the API endpoint. The data is in JSON format.
Original Poster: I am using Axios for CRUD operations in a new VueJS application. Axios needs to query an API (Amazon API Gateway). Currently, I have a simple Vue component that retrieves data and prints it to the console upon response.
axios.get('https://myamazonurl.com/api/resource')
.then(response => console.log(response))
.catch(error => console.log(error))
The Amazon API does not require authentication and is public-facing. When I input the above URL into a browser or Postman, I receive the expected response. However, Axios returns a response without a body (the header is correct, including the correct response length value), but there is no content. When I substitute the URL with any other API, the response body is correct. Additionally, using jQuery/AJAX or fetch also results in a bodyless response when pointing to this specific API, while using them with a different API yields data.