'Assembles a submission to Software Secure and sends it via HTTPS.
Keyword Arguments:
copy_id_photo_from (SoftwareSecurePhotoVerification): If provided, re-send the ID photo
data from this attempt.  This is used for reverification, in which new face photos
are sent with previously-submitted ID photos.
Returns:
request.Response'

def send_request(self, copy_id_photo_from=None):

    if settings.FEATURES.get('AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING'):
        fake_response = requests.Response()
        fake_response.status_code = 200
        return fake_response
    (headers, body) = self.create_request(copy_id_photo_from=copy_id_photo_from)
    response = requests.post(settings.VERIFY_STUDENT['SOFTWARE_SECURE']['API_URL'], headers=headers, data=json.dumps(body, indent=2, sort_keys=True, ensure_ascii=False).encode('utf-8'), verify=False)
    log.info('Sent    request    to    Software    Secure    for    receipt    ID    %s.', self.receipt_id)
    if (copy_id_photo_from is not None):
        log.info('Software    Secure    attempt    with    receipt    ID    %s    used    the    same    photo    ID    data    as    the    receipt    with    ID    %s', self.receipt_id, copy_id_photo_from.receipt_id)
    log.debug('Headers:\n{}\n\n'.format(headers))
    log.debug('Body:\n{}\n\n'.format(body))
    log.debug('Return    code:    {}'.format(response.status_code))
    log.debug('Return    message:\n\n{}\n\n'.format(response.text))
    return response
