lganzzzo on master
codegen: Fix QUERY(TYPE, NAME, … (compare)
lganzzzo on minor_code_cleanup
lganzzzo on master
parser::Caret: code cleanup Merge pull request #703 from oa… (compare)
lganzzzo on minor_code_cleanup
parser::Caret: code cleanup (compare)
lganzzzo on fix_async_body_decoder
lganzzzo on master
SimpleBodyDecoder: Fix async me… Merge pull request #702 from oa… (compare)
Hello @jm130794 ,
Have you tried to run the example-jwt?
I did a test with docker-compose. The server is listening on port 8000 but when I try to access it with curl http://my-ip:8000/ , I get the following message: {"status": "ERROR", "code":401, "message": "Authorization Required"}
How to authenticate on this example?
There is a signup endpoint - https://github.com/oatpp/example-jwt/blob/master/src/controller/AuthController.hpp#L38
You have to signup/login first to get the token
OK for signUp.
Still with the example-jwt. I can't change the "limit" parameter. If I change the value to 20, the limit parameter always remains at 10
* Trying 172.20.65.1:8008...
* Connected to 172.20.65.1 (172.20.65.1) port 8008 (#0)
> GET /stories/offset/6/limit/20 HTTP/1.1
> Host: 172.20.65.1:8008
> User-Agent: curl/7.81.0
> accept: application/json
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXUyJ9.eyJpc3MiOiI8bXktaXNzdWVyPiIsInVzZXJJZCI6IjI5NGVmM2Y4LTM4ZmMtNDE1OS1iYmU2LTY2NGNiZWQ4YzU3NSJ9.D86wBJ80KQ4nZcdO1gp1MfdFzKdrk6zJDU0j0V42sD8
> Content-Type: application/json
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 711
< Content-Type: application/json
< Server: oatpp/1.3.0
< Connection: keep-alive
< Access-Control-Max-Age: 1728000
< Access-Control-Allow-Headers: DNT, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Range, Authorization
< Access-Control-Allow-Methods: GET, POST, OPTIONS
< Access-Control-Allow-Origin: *
<
* Connection #0 to host 172.20.65.1 left intact
{"offset":6,"limit":10,"count":10,"items":[{"id":"7af428c2-e2dd-4be7-bd3f-59cbb0c3e8b8","content":"STORY 7"},{"id":"39e5fe71-61f0-4555-8119-3e17584436e0","content":"STORY 8"},{"id":"360754f2-adca-47ce-82bd-a1e24ebc5414","content":"STORY 9"},{"id":"f1c457e0-25e9-493c-8abe-81a71f489e4e","content":"STORY 10"},{"id":"888d7a45-ac6e-4c4d-af1d-faab792473ba","content":"STORY 11"},{"id":"d5205068-42b6-41f5-8004-8f03c15625ef","content":"STORY 12"},{"id":"4faafb61-c151-487a-b57f-5bd4e5d56107","content":"STORY 13"},{"id":"8b6d77fd-ee92-40b6-aaa4-0e02a781af4f","content":"STORY 14"},{"id":"a21a72bf-a6cd-4ff7-aec1-7ffa178c8b42","content":"STORY 15"},{"id":"271a0481-6bd7-470c-af0f-ef017c10f103","content":"STORY 16"}]}
Do you have an explanation?
Tried a few times with different functions but couldn’t seem to get it working, had to fall back to absolute paths
When oatpp::swagger::Resources
tries to load files and it can't find them it prints out the path it's trying to use.
You may try to use it to debug files loading
Server-side JSON data structure:
class DataReq: public oatpp::DTO {
DTO_INIT(DataReq, DTO);
DTO_FIELD(oatpp::String, Name);
DTO_FIELD(oatpp::String, Value);
DTO_FIELD(oatpp::List<oatpp::String>, ListValue);
DTO_FIELD(oatpp::String, Enable);
};
class RequestDto: public oatpp::DTO {
DTO_INIT(RequestDto, DTO);
DTO_FIELD(oatpp::String, Com);
DTO_FIELD(oatpp::Object<DataReq>, Data);
};
The data structure sent by the front end:
{
"Com":"Set",
"Data":{
"Name":"List",
"Value":"",
"ListValue":[{
"Index":"0",
},{
"Index":"1",
}],
"Enable":""
}
}
Error message received by the front-end:
server=oatpp/1.3.0
code=500
description=Internal Server Error
message=[oatpp::parser::json::Utils::preparseString()]: Error. '"' - expected
ListValue
field as a list of strings
Hello @kevinbenson1 ,
Hello everyone. Is there a plan to tag a new release of oat++ anytime soon? There are some changes that have been committed since 1.3.0 that I would like to pull into our software. If it will be a while, I will just upgrade to 1.3.0 and add them as patches. In general, is additional testing performed on tagged releases? If not, maybe I will just pull in the latest trunk.
In the nearest two month there will be no new tag.
I suggest taking the latest master.
While we do additional testing on tag-builds, we encourage community to use the latest master and report bugs. - Crowd testing:)
Hello @EnderTheCoder ,
Guys I was trying to use oatpp ADD_CORS()
it didn't seem to work on my reponse
From your screenshot - there is a response from oatpp server with
content-type: application/json`.
So it worked.