I have a function which does a http POST request.
(我有一个执行http POST请求的函数。)
The code is specified below.(该代码在下面指定。)
This works fine.(这很好。)
$http({
url: user.update_path,
method: "POST",
data: {user_id: user.id, draft: true}
});
I have another function for http GET and I want to send data to that request.
(我为http GET提供了另一个功能,我想将数据发送到该请求。)
But I don't have that option in get.(但是我没有那个选择。)
$http({
url: user.details_path,
method: "GET",
data: {user_id: user.id}
});
The syntax for http.get
is
(http.get
的语法是)
get(url, config)
(获取(URL,配置))
ask by Sabarish Sankar translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…