Example #1
0
 def test_proxy_post_h1_h1(self):
   responses = [
     http_post(url='https://localhost:8443/', data={"key": "value"}, headers={"x-echo": "echo"}, h2=False),
     http_post(url='https://localhost:8443/', data={"key": "value"}, headers={"x-echo": "echo"}, h2=False),
   ]
   for response in responses:
     self.check_response(response, 'POST')
Example #2
0
  def test_backend_server_post_h2_works(self):
    responses = [
      http_post(url='https://localhost:{}/'.format(back_end.port), data={"key": "value"}, headers={"x-echo": "echo"},
                h2=True),
      http_post(url='https://localhost:{}/'.format(back_end.port), data={"key": "value"}, headers={"x-echo": "echo"},
                h2=True),
    ]

    for response in responses:
      self.check_response(response, 'POST')
Example #3
0
 def test_backend_server_post_h1_works(self):
   response = http_post(url='http://localhost:{}/'.format(back_end.port), data={"key": "value"},
                        headers={"x-echo": "echo"}, h2=False)
   self.check_response(response, 'POST')
Example #4
0
 def test_post_foo(self):
     response = http_post(url='http://localhost:8181/foo', data={})
     self.assertEqual("hello path POST foo", response.body)
     self.assertEqual("there", response.headers['hi'])
     self.assertEqual(200, response.status)