Skip to content
New issue

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

function AddParam :: pkGETorPOST vs pkQUERY #29

Closed
Rik69 opened this issue Sep 5, 2020 · 3 comments
Closed

function AddParam :: pkGETorPOST vs pkQUERY #29

Rik69 opened this issue Sep 5, 2020 · 3 comments
Labels
question Further information is requested

Comments

@Rik69
Copy link

Rik69 commented Sep 5, 2020

Hi,

I use Delphi 10.4 (Sydney)
The following function give me a 404 error. Is there any reason why you force pkQUERY ? It only works when I replace pkQUERY by pkGETorPOST.

unit RESTRequest4D.Request.Intf;

{$IF COMPILERVERSION < 33}
function AddParam(const AName, AValue: string; const AKind: TRESTRequestParameterKind = TRESTRequestParameterKind.pkGETorPOST): IRequest;
{$ELSE}
function AddParam(const AName, AValue: string; const AKind: TRESTRequestParameterKind = TRESTRequestParameterKind.pkQUERY): IRequest;

@viniciussanchez viniciussanchez added the question Further information is requested label Sep 9, 2020
@viniciussanchez
Copy link
Owner

The correct thing is to use pkQuery. But this was only implemented in Delphi RIO onwards. The 404 error needs to be analyzed in the context as a whole, as it should not give the error.

@viniciussanchez
Copy link
Owner

It's ok?

@Rik69
Copy link
Author

Rik69 commented Oct 8, 2020

In my case, I had to use GET or Post so, I used the native Delphi components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants