Browse Source

switch authentication to json content type

LukePulverenti 12 năm trước cách đây
mục cha
commit
bbba73bc6f
1 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 8 1
      MediaBrowser.Api/Javascript/ApiClient.js

+ 8 - 1
MediaBrowser.Api/Javascript/ApiClient.js

@@ -1066,7 +1066,14 @@ var ApiClient = {
         if (password) {
             postData.password = password;
         }
-        return $.post(url, postData);
+        
+        return $.ajax({
+            type: "POST",
+            url: url,
+            data: JSON.stringify(postData),
+            dataType: "json",
+            contentType: "application/json"
+        });
     },
 
     /**