on 06-21-2017 2:34 AM
Hello all,
I am using the sap-job-scheduler Node module in one XSA Application. However, despite all the tries, the Scheduler module always trigger a strange error "this._buildBasicAuthHeader is not a function".
Assuming that the standard module is syntactically correct, what could be the reason of this error?
I also tried to follow along the SHINE Application, and I am doing exactly the same thing:
First, take the connection option from the xs service:
var services = xsenv.getServices({ jobscheduler: { tag: "jobscheduler" } }).jobscheduler;
return {
timeout: 15000,
user: services.user,
password: services.password,
baseURL: services.url
};
Then, try to create a new job:
var scheduleAdmin = jobScheduler.Scheduler(options);
var scJob = {
job: newJob
};
But unfortunately, everything dumps right away at jobScheduler.Scheduler(options): inside, it tries to create the Base64 authorization string and it fails saying that there's no function (which is there indeed):
this._requestDefaults = request.defaults({
json: true,
timeout: this._timeout,
headers : {
'Authorization' : 'Basic ' + this._buildBasicAuthHeader(options)
}
});
Anyone got the same issue?
Cheers,
Roberto.
...it was probably very late in the night.
I checked again this morning, and all I was missing is the "new" keyword...a new object needs to be created 🙂
Problem non existing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.