on 10-23-2014 1:04 AM
Hello,
I see example in HTTP Adapter that allows me to connect (via HTML and Form POST) to HTTP output adapter, and I can see streams coming out of the browser:
<form name="input" action="http://<esp_server>:<esp_port>/start" method="post">
SQL query:
<input type="text" name="sql" size="60" value="select * from Stream1">
<input type="submit" value="Submit">
</form>
Do you have working example on how to do this as jQuery / ajax?
I'm having issues consuming it, plain vanilla $.post would have CORS issue (ESP server is different from my client), I tried xhr but to not much success either.
A working example would really help as I need to consume this in real-time via browser, and update a field on <div></div> section.
Thank you,
Chin
To clarify , when I try to convert to using $.post, I'm getting:
XMLHttpRequest cannot load http://<esp_server>:<esp_http_port>/start. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
Usually if I have control over coding of HTTP server, I can fix this via header, but in this case, its inside the JAR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.