ajax jquery simple get request

前端 未结 5 2063
天命终不由人
天命终不由人 2021-02-03 23:31

I am making this simple get request using jquery ajax:

$.ajax({
    url: \"https://app.asana.com/-/api/0.1/workspaces/\",
    type: \'GET\',
    success: functio         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-03 23:34

    var settings = {
            "async": true,
            "crossDomain": true,
            "url": "",
            "method": "GET",
            "headers": {
                "content-type": "application/x-www-form-urlencoded"
            },
            "data": {
                "username": "user@company.com",
                "password": "12345678"
            }
        }
    
        $.ajax(settings).done(function (response) {
            console.log(response);
        });
    

提交回复
热议问题