AJAX envoie une demande avec en-tête

<script> 
    $ .ajax ({ 
        type: "GET" , en- 
        têtes: { 
            Accept: "application / json; charset = utf-8" , 
            Token: "XXXX" 
        }, 
        withCredentials: true , 
        url: "http: // localhost : 23557 / api / GetValues ​​" , 
        données: { " tel ":" 13714390531 " }, 
        contentType: " application / json " , 
        dataType: " json " , 
        success: function (data) { 
            alert (data);
        }, 
        erreur:fonction (données) { 
 
        } 
    }); 
</script>

 

Je suppose que tu aimes

Origine www.cnblogs.com/zhangzhiping35/p/12699222.html
conseillé
Classement