[REQ][cpp-ue4] A working example
Is your feature request related to a problem? Please describe.
I don't know how to make use of the generated code.
Looking at the interfaces I get some idea, but it takes a while to grok and I'm still not sure if using it correctly.
For example, I'm setting up a request but getting malformed data back. Is that because of how I'm using it or something else?
Describe the solution you'd like
I would like to have a basic example of setting up a request, making the request, and handling the response using the generated code.
Some additional commenting about what functions I should be using and making calls from, or even a mini readme that gets generated along with the code.
(I would also like to have an example on this ticket to selfishly unblock me)
Additional context
This is my hacky code at the moment.
JIRACloudApiV2ServerInfoApi api;
api.SetURL("https://my.jira.instance/");
JIRACloudApiV2ServerInfoApi::GetServerInfoRequest req;
api.GetServerInfo(req);
And the error code I'm getting back.
[2021.11.24-00.26.33:596][ 45]LogJIRACloudApiV2: Error: Failed to deserialize Http response content (type:application/xml;charset=UTF-8):
@tobrien-bit thanks for the feedback
cc @Kahncode
A very basic example:
m_userApi = MakeShared<ModelPrefixUserApi>();
ModelPrefixUserApi::CreateUserRequest request;
request.Body.Username = "foo";
request.Body.Email = "[email protected]";
request.Body.Password = "foobar";
request.SetShouldRetry();
m_userApi->CreateUser(request, ModelPrefixUserApi::FCreateUserDelegate::CreateLambda([](const ModelPrefixUserApi::CreateUserResponse& a_response)
{
if (a_response.IsSuccessful())
{
...
}
else
{
...
}
}));
Awesome, thanks :)