Upload
ivano-malavolta
View
780
Download
1
Embed Size (px)
DESCRIPTION
REST This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013. http://www.ivanomalavolta.com
Citation preview
•
•
–
–
•
•
–
•
•
•
•
•
•
•
•
•
•
•
•
–
–
–
http://restfuljava.com/students/{name}
http://restfuljava.com/students
<student>
<name>Jane</name>
<age>10</age>
<link>/students/Jane</link>
</student>
<students>
<student>
<name>Jane</name>
<age>10</age>
<link>/students/Jane</link>
</student>
<student>
<name>John</name>
<age>11</age>
<link>/students/John</link>
</student>
</students>
–
–
–
–
–
<input type="text" name=“u" id=“u" value="" />
<input type="password" name=“p" id=“p" value="" />
var username = $('#u').val();
var password = MD5($('#p').val());
$.ajax({
type: 'POST',
url: „https://www.domain.com/login.php',
data: {
username: username,
password: password
},
success: function(result) {
console.log(“logged in”);
}
});
•
–
–
–
–
•