0
したい残りのAPIのURLのをパラメータを追加します。休憩API Ajaxのコールは、主にURL
/api/student:id/notes
私は、REST APIのと上記のような私のURLを作成します。しかし、私はノートの前にパラメータを追加する方法を知らない。
$.ajax({
url : "api/v1/student/notes",
data : { "id" : uid },
type : "get",
headers : { "Authorization" : api_key },
dataType : "json",
success : function(response) {
console.log(response);
}
});
このように呼び出すと、URLは/api/student/notes?id=5
と思われます。学生とノートの間にidパラメータを追加するにはどうすればいいですか?
URL例:http://www.sitepoint.com/best-practices-rest-api-scratch-introduction/
'URLのようなもの: 'API/V1 /学生/' + UID +「/ notes'' – Phil
おかげ@Philが、それは動作しますが、答えとして書いてください。 – Ozgun