We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the example: "Get Protected Resource" button
gets the same /admin/role1 endpoint, but it implies the first uses the JSON route and hte second one text/html route.
I think both use the text/html route. { Getting JSON response } doesn't set the lclient.accept, but the comment implies it is set to JSON.
{ Getting HTML response } explicitly sets the lclient.lClient.Accept('text/html')
To demonstrate: Run the VCL client outside of the IDE.
Load the JWTRoleAutServer project Add a breakpoint to: procedure TAdminController.OnlyRole1; and procedure TAdminController.OnlyRole1EmittingJSON;
based on the calling code, I think it should call the JSON only, then the text/html on. IN fact it calls the text/html one twice.
To make it work as expected you could assign the accept explitcitly. lResp := lClient.Accept('application/json').Get('/admin/role1');
It just means the default is text/html, not JSON, not a biggy, just incorrect in the example.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the example: "Get Protected Resource" button
gets the same /admin/role1 endpoint, but it implies the first uses the JSON route and hte second one text/html route.
I think both use the text/html route.
{ Getting JSON response } doesn't set the lclient.accept, but the comment implies it is set to JSON.
{ Getting HTML response } explicitly sets the lclient.lClient.Accept('text/html')
To demonstrate:
Run the VCL client outside of the IDE.
Load the JWTRoleAutServer project
Add a breakpoint to:
procedure TAdminController.OnlyRole1;
and
procedure TAdminController.OnlyRole1EmittingJSON;
based on the calling code, I think it should call the JSON only, then the text/html on. IN fact it calls the
text/html one twice.
To make it work as expected you could assign the accept explitcitly.
lResp := lClient.Accept('application/json').Get('/admin/role1');
It just means the default is text/html, not JSON, not a biggy, just incorrect in the example.
The text was updated successfully, but these errors were encountered: