Skip to content
Advertisement

Tag: postman

countDocuments() is not working in api call

I am trying to get a count of products using api calls but in postman its keep loading without async and await also its not working I try to catch the error and i got this error in postman code to catch error: Answer I think in Mongoose operations you want to either await or provide a callback, but not

How can I get returned string values in fetch()

Below code is my fetch method in my separate register.js. This is my newly created js file, so I can create my front end. At the moment I’m just trying to console.log the ending result for this fetch, but can’t get the output since I’m getting an error when I try to POST this. error in browser console: “Uncaught (in

How can I visualize an API mashup in Postman?

I have a REST API of classical actors that I want to visualize in Postman. The image URL of an actor is not in the API, so I will need to create a mashup from a combination of the core API and another API. 1. Prerequisites The core API/endpoint is at http://henke.atwebpages.com/postman/actors/actors.json: The image URLs of Katharine Hepburn and Humphrey

How to get the first object of an array by condition?

I have a response: Response body: I receive an array with 5 objects. I want to set the variable for the first object within “type”: “Group”. attachment image. But I don’t know the way. Does anyone help me??? Answer What you’re looking for is .find which returns the first occurrence matching a predicate or undefined. For example: See the example

Advertisement