Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simplicitesoftware/ajax-demo
A basic example of Simplicite REST services using Ajax
https://github.com/simplicitesoftware/ajax-demo
Last synced: about 14 hours ago
JSON representation
A basic example of Simplicite REST services using Ajax
- Host: GitHub
- URL: https://github.com/simplicitesoftware/ajax-demo
- Owner: simplicitesoftware
- Created: 2016-10-26T08:40:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T12:22:37.000Z (2 months ago)
- Last Synced: 2024-08-26T14:38:50.979Z (2 months ago)
- Language: HTML
- Size: 521 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Simplicité Software](https://platform.simplicite.io/logos/logo250-grey.png)
***Ajax web frontend demo
======================[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=simplicitesoftware_ajax-demo&metric=alert_status)](https://sonarcloud.io/dashboard?id=simplicitesoftware_ajax-demo)
This project is a **very basic** web front-end demo written in a single HTML page (including jQuery® and Bootstrap®) using the Simplicité® REST services.
The file to use is `index.html`
If you want to use your own Simplicité® instance you just need to adjust the root URL in the `root` variable to point to your instance's base API URL (typically `http[s]:///[]/api`)
Some other very basic examples are provided:
- `xhr-example.html`: simple call to the user data REST service using the standard `XMLHttpRequest` API
- `fetch-example.html`: simple call to the user data REST service using the standard `fetch` API
- `ajaxlib-example.html`: same example as above but using the instance's Ajax library
- `jslib-example.html`: same example as above but using the Simplicité JS client libraryAuthentication method
---------------------The auth token-based authentication method used in the `index.html` file is the recommended approach:
- First call to the `/api/login` endpoint to obtain an auth token by posting login and password as a basic auth string header.
- Then use the obtained auth token for all subsequent calls to REST services using the custom `X-Simplicite-Authorization` HTTP header with `Bearer ` as valueLicense
=======Copyright 2016-2022 Simplicité Software
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:[](http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.