Pm.sendrequest client side or server side?

I was just wondering whether the pm.sendrequest function is executed on the client or server side of the postman app. I know that some API’s use CORS’ " Access-Control-Allow-Origin" to block the content if the request is sent client side as it exposes API key’s. I’m trying to keep the requests in the collection to a minimum and this would add roughly 100 requests if I’m unable to execute server side in the post request scripts.

Welcome to the community!

Requests from pm.sendRequest go via the client, exactly the same as the requests you make in the client normally.

The exception to this is if you run your collection as a Postman Monitor, at which point it runs in Postman’s cloud. Using newman will cause the requests to originate from the machine running Newman.

Perhaps you could expand on your use-case a little? Running requests server side won’t necessarily prevent the CORS errors you mention unless that server is an accepted origin on the API side.