API MOTU ultralite mk4

For seeking technical help with Digital Performer and/or plug-ins on Windows.

Moderator: James Steele

Forum rules
This forum is for seeking solutions to technical problems involving Digital Performer and/or plug-ins on Windows, as well as feature requests, criticisms, comparison to other DAWs.
Post Reply
gregenforce7
Posts: 1
Joined: Mon Dec 12, 2016 1:50 pm
Primary DAW OS: Windows

API MOTU ultralite mk4

Post by gregenforce7 »

Hello,

I am an amateur and I recently bought a MOTU UltraLite mk4.
I try to change values ​​via API provided by MOTU but I can not do it ...
Here is my code:

Code: Select all

var getJSON = function(url, successHandler, errorHandler) {
			var xhr = new XMLHttpRequest();
			xhr.open('POST', url, true);
			xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
			//xhr.responseType = 'json';
			xhr.onload = function() {
				var status = xhr.status;
				if (status == 200) {
					successHandler && successHandler(xhr.response);
				} else {
					errorHandler && errorHandler(status);
				}
			};
			xhr.send(JSON.stringify('json={"value":"test"}));
		};

		getJSON('http://localhost:1280/0001f2fffe002213/datastore/ext/obank/2/ch/0/name', function(data) {
			alert('Your public IP address is: ');
		}
		, function(status) {
			alert('Something went wrong.');
		});
I have always error 400 bed request ...
Can you help me ?

Thanks you
Post Reply