If I am using pm.sendRequest, how do I go about generating an AWS Signature? I need to create some tests that involve polling an SQS queue to ensure certain messages are delivered. However, that means I need pm.sendRequest to make repeated calls to polls the SQS and delete the messages off. I’m not seeing a way to this.
Don’t use pm.sendRequest for this as you don’t want to compute the signature.
Just reuse a regular Postman request. You can use postman.setNextRequest to retry the same request.
That’s what I’ve done, it just seems kludgy. I am polling an SQS Queue and iterating the messages to make sure I receive what I expect. So I have to basically call the same request in a loop.
How would that be different with pm.sendRequest? You would still be polling, right?
I don’t have the risk of someone doing something as simple and seemingly innocuous as renaming a request breaking the whole loop because setNextRequest expects the request name and doesn’t even seem to fail if you specify an invalid name…
Use the requestId instead of the request name, if this is your concern.
You can get it from the pm.info object.