Sign in to follow this  
Followers 0
Wurstmann

API V2 - GET JSON

2 posts in this topic

Hello Resilio-Team,

I am trying to get the JSON output from "http://127.0.0.1:****/api/v2/folders/activity" with the following code:

<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
	</head>
<body>
<script>
$(document).ready(function() {
	$.ajax({
		url: "http://127.0.0.1:50136/api/v2/folders/activity",
		cache: true,
		dataType: "jsonp",
		jsonp: false,
		jsonpCallback: false,
		type: "GET",
		complete: function(result) {
			alert(result);
		},
		success: function(result) {
			alert(result);
		},
		error: function(result) {
			console.log(result);
		}
	});
			
});


</script>

</body>
</html>

Chrome Network Monitor seems to look fine:

chrome-network.png.7cbe38f98583e84308eb3f36f1bddc81.png

But everytime i got an error message in console:

chrome-error.thumb.png.08401cd8b7602b9e2cd06e9352c3146c.png

 

 

Can some one help to fetch that json data correctly?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0