2016-11-28 30 views
0

您好,我在frisby刪除請求期間遇到500錯誤。代碼如下,請糾正我,如果我做了任何錯誤..!在frisby刪除請求中獲取500錯誤

var frisby = require('frisby'); 

//get the current UTC time from this URL: (https://currentmillis.com/) 
var now = new Date(); 
var now_utc = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds()) 
var currentUTCTime = now_utc.getTime() - (now_utc.getTimezoneOffset() * 60000); 

frisby.create('Authentication for Delete Request Valid User Name and Password') 
    .delete('http://example.com', 
     { 
     headers: 
     { 
       'Accept':'application/json', 
       'Auth-Username':'abcd', 
       'X-Application-Key':'xyzzzz', 
       'Content-Type':'application/json', 
       'x-locale':'en_US', 
       'x-microtime':currentUTCTime, //get the current UTC time 
       'auth-signature': 'example', // Added new auth-signature for new responses 
       } 
      } 
     ) 
    .expectStatus(200) 
    .toss() 
+0

請幫幫我。 –

回答

0

500表示內部服務器錯誤。這意味着你的REST調用在服務器中破壞了某些東西。請檢查服務器日誌以查看真正的問題。這可能會有一些問題服務器端。

相關問題