I have a function that makes an HTTP request and then returns the response. I\'d like this function to be able to run in blocking or non-blocking mode depending on a paramet