diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py index 8d5f85739..18098e633 100644 --- a/web/pgadmin/tools/sqleditor/__init__.py +++ b/web/pgadmin/tools/sqleditor/__init__.py @@ -1389,7 +1389,7 @@ def save_file(): @blueprint.route( '/query_tool/download/', - methods=["GET"], + methods=["POST"], endpoint='query_tool_download' ) @login_required @@ -1401,7 +1401,7 @@ def start_query_download_tool(trans_id): if status and sync_conn is not None and \ trans_obj is not None and session_obj is not None: - data = request.args if request.args else None + data = request.values if request.values else None try: if data and 'query' in data: sql = data['query'] diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index 9e7766e02..f6b63e2ca 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -3564,17 +3564,14 @@ define('tools.querytool', [ var self = this, url = url_for('sqleditor.query_tool_download', { 'trans_id': self.transId, - }); - - url += '?' + $.param({ - query: query, - filename: filename, - }); + }), + data = { query: query, filename: filename }; // Get the CSV file self.download_csv_obj = $.ajax({ - type: 'GET', + type: 'POST', url: url, + data: data, cache: false, async: true, xhrFields: {