ashb commented on a change in pull request #15795:
URL: https://github.com/apache/airflow/pull/15795#discussion_r636867154



##########
File path: airflow/www/static/js/connection_form.js
##########
@@ -140,6 +140,55 @@ $(document).ready(function () {
     }
   }
 
+  $.fn.serializeObject = function () {
+    const o = {};
+    const a = this.serializeArray();
+    $.each(a, function () {
+      if (this.name === 'csrf_token') {
+        // dont send csrf token
+      } else if (this.name === 'conn_id') {
+        o.connection_id = this.value;
+      } else if (this.value !== '') {
+        o[this.name] = this.value;
+      }
+    });
+    return o;
+  };

Review comment:
       Ah gotcha.
   
   Another option would be to convert the API endpoint to _also_ accept 
www-form-encoded data?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to