rr1 commited on
Commit
6f36991
·
verified ·
1 Parent(s): 377e4b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -24
app.py CHANGED
@@ -13,7 +13,7 @@ PATH_MAPPINGS = {
13
  }
14
 
15
 
16
- @app.route('/<path:path>', methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH'])
17
  def proxy(path):
18
  # Construct the full path
19
  full_path = f"/{path}"
@@ -46,29 +46,6 @@ def proxy(path):
46
  params=request.args,
47
  stream=True
48
  )
49
- elif request.method == 'PUT':
50
- response = requests.put(
51
- target_url,
52
- headers=headers,
53
- json=request.get_json(silent=True),
54
- params=request.args,
55
- stream=True
56
- )
57
- elif request.method == 'DELETE':
58
- response = requests.delete(
59
- target_url,
60
- headers=headers,
61
- params=request.args,
62
- stream=True
63
- )
64
- elif request.method == 'PATCH':
65
- response = requests.patch(
66
- target_url,
67
- headers=headers,
68
- json=request.get_json(silent=True),
69
- params=request.args,
70
- stream=True
71
- )
72
 
73
  # Create a response with the same status code, headers, and streaming content
74
  def generate():
 
13
  }
14
 
15
 
16
+ @app.route('/<path:path>', methods=['GET', 'POST'])
17
  def proxy(path):
18
  # Construct the full path
19
  full_path = f"/{path}"
 
46
  params=request.args,
47
  stream=True
48
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  # Create a response with the same status code, headers, and streaming content
51
  def generate():