Can anybody give an example on using rest in getting and posting data from/to python server using Angularjs . Please provide an example for both client(angularjs) and server(python) .. where my sample client-side code is
var student_id = 12
$http({
method:"POST" // or get
url: //url to the python file
data: //this is what confusing me .. how to send that student id
}).success(function(data){
console.log(data);
})
and in python i want to run a function which prints student id
def print_info(id): ## here id is the student id that shall be recieved
print "student id is %s" %id
here i want the js client to send that student_id value to python server where it should receive it and send that value of print_info function to the client.. Thanks in advance..