def _SendJSONRequest(self, user, pwd, otp_entry, exp_code, exp_has_cookie):
    request_dict = {'username': user, 'password': pwd, 'otp': otp_entry}
    headers={'Content-Type': 'application/json',
             'X-Xsrftoken': 'fake_xsrf',
             'Cookie': '_xsrf=fake_xsrf'}
    url = self._tester.GetUrl('/admin/otp')
    self._tester.http_client.fetch(
      url, callback=partial(self._VerifyAdminAuthResponse, exp_code, exp_has_cookie),
      method='POST', body=json.dumps(request_dict), follow_redirects=False, headers=headers)
Sends a request using JSON protocol.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/admin_auth_test.py/AdminAuthTestCase._SendJSONRequest