Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
jvx:common:util:rest [2019/03/13 09:10]
admin
jvx:common:util:rest [2019/03/26 21:30]
admin [Integration]
Line 1: Line 1:
-~~Title: REST service~~+~~Title: REST services~~
  
 We define the business logic with [[jvx:​server:​lco:​objects|life-cycle objects]] on the server side. The access authorization of an application is checked by a [[jvx:​server:​security:​manager|security manager]]. The business logic is usually available via master- or subconnections from the client. We define the business logic with [[jvx:​server:​lco:​objects|life-cycle objects]] on the server side. The access authorization of an application is checked by a [[jvx:​server:​security:​manager|security manager]]. The business logic is usually available via master- or subconnections from the client.
Line 464: Line 464:
  
 curl_close($ch);​ curl_close($ch);​
 +</​file>​
 +
 +Using Javascript:
 +
 +<file html rest.html>​
 +<​html>​
 +<​head>​
 +<​script>​
 +function doRest() {
 +    const http = new XMLHttpRequest();​
 +    const url='​https://<​server>/​DB/​services/​rest/​League/​Standings/​action/​getResults';​
 +
 +    http.open("​POST",​ url, true, '​user',​ '​password'​);​
 +    http.withCredentials = true;
 +    http.send("​[88]"​);​
 +
 +    http.onreadystatechange=(e)=>​
 +    {
 + if (http.readyState == 4)
 + {
 +     console.log(atob(eval(http.responseText)));​
 + }
 +    }
 +}
 +</​script>​
 +</​head>​
 +<​body>​
 +<button type="​button"​ onclick="​doRest()">​REST call</​button>​
 +</​body>​
 +</​html>​
 </​file>​ </​file>​
  
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information