You are not logged in.
Pages: 1
Hi!
In the examples mORMot2\ex\ThirdPartyDemos\martin-doyle, the request:
http://localhost:11111/root/sample does not work. It returns the following result:
{
"errorCode": 404,
"errorText": "Not Found"
}
Previously, the result of the request was a list of sample object IDs.
Is this a bug?
In the example:
mORMot2\ex\ThirdPartyDemos\martin-doyle\04-InterfacedBasedServices,
when making a POST request to:
http://localhost:11111/root/Example/Add
with the header "Content-Type: application/json" and sending the object:
{"Name": "Name 1", "Question": "Question 1"}
The database inserts empty values instead, as shown below:
insert into Sample (Name, Question, Time) values (:(''):,:(''):,:(135932236896):)
What should be done to resolve this issue?
Offline
Which example are you talking about in your first remark?
You are using /sample then /example
The REST endpoint to access the ORM is likely to be just disabled.
As it should with interface based services: you should not publish the ORM tables AND the interface based services at the same time.
Offline
1. mORMot2\ex\ThirdPartyDemos\martin-doyle\02-HttpClientServerORM
2. mORMot2\ex\ThirdPartyDemos\martin-doyle\04-InterfacedBasedService
When creating an object, JSON is not passed in the HTTP request.
http://localhost:11111/root/Example/Add
Last edited by alexkam75 (2025-09-26 08:39:08)
Offline
Take a look at the mORMot 1 documentation about the differences between:
1) REST access to the ORM tables
2) method-based services
3) interface-based services.
To understand more about what to expect or not depending on how you initialize the server side.
Offline
Pages: 1