Thanks
Below a working sample
<script>
var app = angular.module('myApp', []);
app.config(['$httpProvider', function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
}
]);
app.controller('planetController', function($scope, $http) {
var url = "http://cayley.redaelli.org:64210/api/v1/query/gremlin";
var payload = "g.V('tyre:1335105').Out(null,'predicate').All()";
$http.post(url, payload, {
transformRequest: angular.identity,
headers: {'Content-Type': undefined}
})
.then(function(response) {$scope.names = response;})
});
</script>
Thanks
Matteo
On Friday, September 11, 2015 at 8:06:00 AM UTC+2, Sander Elias wrote:
>
> Hi Matteo,
>
> See the answer I just gave here
> <https://groups.google.com/d/msg/angular/njMpXx_0eCk/HpZNo0eKEgAJ>. It
> applies to your question as well.
> If you need additional help, just ask. (preferably with an added plunk
> <http://plnkr.co/edit/tpl:bSBatno6Z85VMCtxF4KK>!)
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.