Answer the question
In order to leave comments, you need to log in
I am writing an application in Angular, how to solve the problem of not fulfilling API requests?
Hello, I am writing applications for ios on the ionic frame, which is also angular with a shell, and then there was such a problem that:
$http.get(' 127.0.0.1:8000/api/v1/order/?client=1&format=json ').
success(function(data) {
$scope.orders = data.objects;
}
)
fires and returns the data, but here:
$http.post(' 127.0.0.1:8000//api/v1/order ', {client: 1} ).
success(function(data) {
return data;
}
);
and other queries don't work. Help solve this problem.
The API is taken from django-tastypie.
POST request returns 404 :
[27/Mar/2015 01:07:15] "GET /api/v1/order/?client=1&format=json HTTP/1.1" 200 732
[27/Mar/2015 01:07:25 ] "POST //api/v1/order/ HTTP/1.1" 404 2047
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question