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

Chave da API com % #210

Open
MiltonSonoda opened this issue Jun 11, 2024 · 8 comments
Open

Chave da API com % #210

MiltonSonoda opened this issue Jun 11, 2024 · 8 comments

Comments

@MiltonSonoda
Copy link

MiltonSonoda commented Jun 11, 2024

Vinícus,
Não consigo validar a chave da API que estou tentando consumir, provavelmente por a mesma conter o caracter '%'.
Não tenho a opção do [DonotEncode] como tenho no RestClient do Delphi.

TRequest.New.BaseURL('URL')
.AddParam('api_key', 'qyqt%2bcK6abcRxxjbJHAImdf%3d%3d', pkGETorPOST)
.ContentType('application/json')
.AddBody('{"name":"Vinicius"}')
.Post;

Pode ser isso?
Grato.
P.S. : No Rest Debugger funciona, colocando a opção do DoNotEncode.

@viniciussanchez
Copy link
Owner

Boa tarde...
poDoNotEncode é no Header. Parâmetros não tem essa opção...
Esse api_key não é um header?

@MiltonSonoda
Copy link
Author

Tentei também sem sucesso.
.AddParam(LParams[0], LParams[1], pkGETorPOST, [poDoNotEncode])
ou
.AddHeader(LParams[0], LParams[1], [poDoNotEncode])

Posso te enviar o projeto teste?

@viniciussanchez
Copy link
Owner

Anexa aqui o exemplo... mas como eu falei... como está a documentação dessa api? como fez no postman?

@MiltonSonoda
Copy link
Author

MiltonSonoda commented Jun 12, 2024 via email

@viniciussanchez
Copy link
Owner

A imagem não veio.. e o link está sem permissão de acesso.

@MiltonSonoda
Copy link
Author

MiltonSonoda commented Jun 12, 2024 via email

@MiltonSonoda
Copy link
Author

MiltonSonoda commented Jun 12, 2024 via email

@MiltonSonoda
Copy link
Author

Vinícius, desculpa. Conseguiu reproduzir?

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

No branches or pull requests

2 participants