Add parameters to query string when using PUT method with Angular's $http

后端 未结 3 905
一向
一向 2021-01-01 11:08

I\'m using Angular\'s $http service to make web api requests. When I use the GET method, the two param values are added to the query string:

//         


        
3条回答
  •  猫巷女王i
    2021-01-01 11:15

    If your api url is "api/test/heroId/power",

    var data = 123+'/Death ray'

    $http.put("api/test"+data);

提交回复
热议问题