Added 'allow_redirects' parameter in perform_request function for RequestsHttpConnection (#401)
Signed-off-by: saimedhi <[email protected]>
This commit is contained in:
@@ -14,9 +14,16 @@ from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
|
||||
class TestHTTPRequestHandler(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
self.send_response(200)
|
||||
headers = self.headers
|
||||
self.send_header("Content-type", "application/json")
|
||||
|
||||
if self.path == "/redirect":
|
||||
new_location = "http://localhost:8090"
|
||||
self.send_response(302)
|
||||
self.send_header("Location", new_location)
|
||||
else:
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "application/json")
|
||||
|
||||
self.end_headers()
|
||||
|
||||
Headers = {}
|
||||
|
||||
Reference in New Issue
Block a user