(self, path)
| 55 | @expose('/api/<path:path>', methods=('GET', 'POST')) |
| 56 | @safe |
| 57 | def proxy_kernel_manager(self, path) -> FlaskResponse: |
| 58 | if request.method == "POST": |
| 59 | resp = requests.post( |
| 60 | f'http://localhost:{KERNEL_APP_PORT}/solidui/kernel/{path}', json=request.get_json()) |
| 61 | else: |
| 62 | resp = requests.get(f'http://localhost:{KERNEL_APP_PORT}/solidui/kernel/{path}') |
| 63 | |
| 64 | excluded_headers = ['content-encoding', |
| 65 | 'content-length', 'transfer-encoding', 'connection'] |
| 66 | headers = [(name, value) for (name, value) in resp.raw.headers.items() |
| 67 | if name.lower() not in excluded_headers] |
| 68 | |
| 69 | return self.response_format(code=resp.status_code, data=resp.content.decode('utf-8')) |
| 70 | |
| 71 | @expose('/generate', methods=('POST',)) |
| 72 | @safe |
nothing calls this directly
no test coverage detected