Repository navigation
|
This is in relation to how you call endpoints because it is impossible via the browser, and confusing every other way. I had to find how to actually cURL something from another discussion post. Normally when you call something a method in an API you mean GET POST PUT DELETE etc. but here you literally have to put class Example extends Endpoint {
Future<String> get(Session session) async {
return 'Hello from the server!';
}
Future<int> delete(Session session, int id) {
// delete the thing
return numDeleted;
}
} |
Replies: 1 comment
|
Serverpod is more aiming to be a RPC (remote procedure call) over a REST API. That being said, it's, of course, possible to call your serverpod using REST methods, but the preferred way is to use the generated client. The client will make an abstraction of all of your protocol, so you don't really need to fiddle around with it. :) In the future, we are planning on adding support for more client languages, so that it is easier to access your Serverpod from the web, react, etc. |
Serverpod is more aiming to be a RPC (remote procedure call) over a REST API. That being said, it's, of course, possible to call your serverpod using REST methods, but the preferred way is to use the generated client. The client will make an abstraction of all of your protocol, so you don't really need to fiddle around with it. :)
In the future, we are planning on adding support for more client languages, so that it is easier to access your Serverpod from the web, react, etc.