In my database, I got some data that has different media_types. video or image. The one that has the media type video, is altered to image when recieved in Axios get method. To pinpoint the error, I did try with both Angular 7 and Postman, and both of them recieves the correct JSON.
I have a SpringBoot microservice that fetches the daily imahe from the NASA rest API. Stores it in a MongoDB. All the images render perfectly in my own client (Vue), but the video does not show up. Some debugging later, I noticed that it doesn't show up, as it is tagged image instead of a video. I use a v-if / v-else on rendering correct type of html tag ( img or iframe ). To rule out that it is Vue or my SpringBoot application, I did try with Postman, and the JSON from the backend was perfect. I then did try with an Angular 7 project, and yet again, the media type was correct. In Axios, when I console logged the response, it stands image in the media type, and I just don't understand why it is altered or where it gets altered.
getAll: () => instance.get('dailyimage/').then((response) => {
console.log(response.data);
return response.data;
}),
Axios outcom:
Angular outcome:
The expected result would be that in Axios I still have the media_type correct and not changed as it is now. There is no error messages either which is even harder to know what have happened.