Skip to content

Commit

Permalink
soapclient.js: remove discover
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed May 17, 2020
1 parent 229ce2a commit fe98d9e
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions lib/soapclient.js
Expand Up @@ -263,32 +263,6 @@ const soapClient = function (opt = {}) {
});
}

function discover() {
// @ts-ignore
return axios.get(HNAP_AUTH.url,
{ //first request challenge and stuff
headers: {
'Content-Type': 'text/xml; charset=utf-8',
'SOAPAction': '""',
'connection': 'keep-alive',
},
auth: {
username: HNAP_AUTH.user,
password: HNAP_AUTH.pwd
},
timeout: 10000,
httpAgent: agent
}).then(function (response) { //then log in with the information gathered in first request
//save keys.
console.log('Login request came back: ', response);
console.log('Body: ', response.data);
}).catch(function (err) {
//throw error here, so we can react to it outside (?)
console.log('error during HNAP login:', err);
throw err;
});
}

/**
* Get full device description XMLs -> used to support new devices.
* @returns {Promise<unknown>}
Expand Down

0 comments on commit fe98d9e

Please sign in to comment.