I have a promise, which gets the credentials from http://someurl/credentials.
const credentials = await this._axiosSomeVar.get(`/credentials/${serviceName}`)
return credentials
As you can see, I return the promise object. And it works as well. But now I need to return the Map()
object, which contains pair username & password.
Something like:
return new Map(credentials.data.username, credentials.data.password)
But it is just pseudo code and, unfortunately, search in google did not help me to make it works.