'Helper method to validate LTI 2.0 REST result service HTTP headers.  returns if correct, else raises LTIError
Arguments:
request (xblock.django.request.DjangoWebobRequest):  Request object
verify_content_type (bool):  If true, verifies the content type of the request is that spec\'ed by LTI 2.0
Returns:
nothing, but will only return if verification succeeds
Raises:
LTIError if verification fails'

def verify_lti_2_0_result_rest_headers(self, request, verify_content_type=True):

    content_type = request.headers.get('Content-Type')
    if (verify_content_type and (content_type != LTI_2_0_JSON_CONTENT_TYPE)):
        log.info('[LTI]:    v2.0    result    service    --    bad    Content-Type:    {}'.format(content_type))
        raise LTIError('For    LTI    2.0    result    service,    Content-Type    must    be    {}.        Got    {}'.format(LTI_2_0_JSON_CONTENT_TYPE, content_type))
    try:
        self.verify_oauth_body_sign(request, content_type=LTI_2_0_JSON_CONTENT_TYPE)
    except (ValueError, LTIError) as err:
        log.info('[LTI]:    v2.0    result    service    --    OAuth    body    verification    failed:        {}'.format(err.message))
        raise LTIError(err.message)
