def get_binary_annotations(request, response):
    """Helper method for getting all binary annotations from the request.
    :param request: the Pyramid request object
    :param response: the Pyramid response object
    :returns: binary annotation dict of {str: str}
    """
    return {'http.uri': request.path, 'http.uri.qs': request.META[
        'QUERY_STRING'], 'response.status_code': str(response.status_code),
        '/http/url': request.path, '/http/user_agent': request.META.get(
        'HTTP_USER_AGENT', ''), '/http/status_code': str(response.
        status_code), '/http/method': request.method}
