Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session management in Javascript without ocpu.call #349

Open
TianrenWang opened this issue Jul 18, 2019 · 2 comments
Open

session management in Javascript without ocpu.call #349

TianrenWang opened this issue Jul 18, 2019 · 2 comments

Comments

@TianrenWang
Copy link

TianrenWang commented Jul 18, 2019

I am running a web-app with Angular front-end and Node.js backend. I cannot import ocpu object in the opencpu.js script like shown in the documentation and appdemo example because the script that makes the ocpu requests is completely separated from the client (thus it doesn't have a window object). Is there an alternative to ocpu.call in Javascript that still allows me to manage opencpu sessions? I tried using the request function in Javascript, but the sessionid is treated purely as a string when passed as an argument in JSON format.

I should also mention that I tried adding the sessionid as a parameter directly to the request URL, but opencpu doesn't seem to recognize it. For example, this request URL would give this error:

localhost:5307/ocpu/library/DNFAPI/R/testSession?input=4

argument "input" is missing, with no default

In call:
testSession()
@ionvirgil
Copy link

Did you manage to solve this issue?

@TianrenWang
Copy link
Author

@nelusan Nope, but I don't really need this functionality anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants