简体   繁体   中英

Is it possible to create a client-side REST API?

Is it possible to set up a JS REST API in the browser?
The idea is that my web server posts data to the client API and that the UI is updated:D
The communication should be encrypted so I figure HTTPS has to enter the mix.

This is probably a silly question and you might wonder why?
The answer is I looked at PHP websockets and read about memory leaks and frequently restarting the server which led me to think websocket in PHP aren't quite there yet.

The server can't request services from a client, but you can send the results from client-side to the server via AJAX for example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM