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
de:jvx:common:util:rest [2019/03/13 09:11]
admin
de:jvx:common:util:rest [2020/07/24 23:42]
admin
Line 44: Line 44:
  
 Anmeldung testen:​\\ ​ Anmeldung testen:​\\ ​
-''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​**<​fc #​BF0000>​LIFECYCLE_CLASS</​fc>​**/​_admin/​**<​fc #​BF0000>​testAuthentication</​fc>​**''​ \\ +''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​_admin/​**<​fc #​BF0000>​testAuthentication</​fc>​**''​ \\ 
 oder \\  oder \\ 
-''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​**<​fc #​BF0000>​LIFECYCLE_CLASS</​fc>​**/​_admin/​**<​fc #​BF0000>​testAuthentication</​fc>​**/​**<​fc #​BF0000>​parameter</​fc>​**''​+''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​_admin/​**<​fc #​BF0000>​testAuthentication</​fc>​**/​**<​fc #​BF0000>​parameter</​fc>​**''​
  
 Der Request benötigt eine HashMap im JSON Format. Der Request benötigt eine HashMap im JSON Format.
Line 67: Line 67:
  
 Anmeldung testen:​\\ ​ Anmeldung testen:​\\ ​
-''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​**<​fc #​BF0000>​LIFECYCLE_CLASS</​fc>​**/​_admin/​**<​fc #​BF0000>​changePassword</​fc>​**''​ \\ +''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​_admin/​**<​fc #​BF0000>​changePassword</​fc>​**''​ \\ 
 oder \\  oder \\ 
-''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​**<​fc #​BF0000>​LIFECYCLE_CLASS</​fc>​**/​_admin/​**<​fc #​BF0000>​changePassword</​fc>​**/​**<​fc #​BF0000>​parameter</​fc>​**''​+''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​_admin/​**<​fc #​BF0000>​changePassword</​fc>​**/​**<​fc #​BF0000>​parameter</​fc>​**''​
  
 Der Request benötigt eine HashMap im JSON Format. Der Request benötigt eine HashMap im JSON Format.
Line 101: Line 101:
 Der Aufruf erfolgt mittels: Der Aufruf erfolgt mittels:
  
-''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​**<​fc #​BF0000>​LIFECYCLE_CLASS</​fc>​**/​_admin/​**<​fc #​BF0000>​ACTION</​fc>​**''​ \\ +''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​_admin/​**<​fc #​BF0000>​ACTION</​fc>​**''​ \\ 
 oder \\  oder \\ 
-''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​**<​fc #​BF0000>​LIFECYCLE_CLASS</​fc>​**/​_admin/​**<​fc #​BF0000>​ACTION</​fc>​**/​**<​fc #​BF0000>​parameter</​fc>​**''​+''<​nowiki>​http://​server:​port/​webapp/​services/​rest/</​nowiki>​**<​fc #​BF0000>​APPLICATION_NAME</​fc>​**/​_admin/​**<​fc #​BF0000>​ACTION</​fc>​**/​**<​fc #​BF0000>​parameter</​fc>​**''​
  
 ==== Storage Zugriff ​ (CRUD, Meta Data) ==== ==== Storage Zugriff ​ (CRUD, Meta Data) ====
Line 465: Line 465:
  
 curl_close($ch);​ curl_close($ch);​
 +</​file>​
 +
 +Mittels 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