added sync/async option to WithHeadersJsonHttpResponseHandler