Associating an outgoing request with its response
Is there an easy way to associate a request going through the processHttpMessage of a registered IHttpListener with the response that comes back later?
Thanks for your message. The easiest way at present is to take a hash of the request. Keep a Map within your extension which maps hash(request) to the data you need to track. When a response comes back, you can look call getRequest(), calculate the hash, and fetch the data from the map.
I realize this isn’t ideal. We’ve had a few requests to provide a unique ID on each IHttpRequestResponse. That’s on the development backlog.
Please let us know if you need any further assistance.
Thanks for the fast response. I was planning on going that route but wanted to make sure there wasn't something provided first.