i'm trying to connect my Cordova project at the API of Oxford Dictionnary api for building an application. I just need to return an array on JSON with this request. https://developer.oxforddictionaries.com/documentation
I need a server request for call the API. Then I download a plugin in cordova, it's "cordova-plugin-http-advanced" but I have two problems when i'm trying to call the API.
Cannot read property 'http' of undefined
cordova.plugin.http.get('https://od-api.oxforddictionaries.com/api/v1', {
source_lang: "en",
word_id: "ace",
app_id: "xxxxxx",
app_key: "xxxxxxxxxxxx"
}, { Authorization: 'OAuth2: ???' }, function(response) {
console.log(response.status);
}, function(response) {
console.error(response.error);
});
And my second problem is in the Authorization case, what I need to write ? My app_key ?
Thx for the helping
Index.html
<!DOCTYPE html>
<html>
<head>
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-
scalable=no">
<link rel="stylesheet" type="text/css" href="css/index.css">
<script type="text/javascript" src="cordova.js"></script>
<title>Oxford Dictionnary</title>
</head>
<body>
<!-- CONSOLE.LOG FOR LOOKING FOR THE OBJECT RETURN IN JS -->
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>