Skip to content

Como adicionar um json ao Body do dwParams? #345

Closed Answered by mobius1qwe
Hawkinks asked this question in Q&A
Discussion options

You must be logged in to vote

2.0.7 não é a última, do trunk a última é 2.0.8-29, mas ok.
Pra usar o clientEvents você precisa construir o objeto param antes de adicionar ele no DWParams, tipo assim:

procedure TfPrincipal.cbTableNameEnter(Sender: TObject);
var
  ClientPooler: TRESTDWIdClientPooler;
  Params: TRESTDWParams;
  JSONParam: TJSONParam;
begin
  ConfiguraComponentes;
  
  // Cria os componentes
  ClientPooler := TRESTDWIdClientPooler.Create(nil);
  ClientPooler.AuthenticationOptions := FAuthType;

  Params := TRESTDWParams.Create;
  Params.Encoding := ClientPooler.Encoding;

  // Cria os parâmetros
  JSONParam := TJSONParam.Create(ClientPooler.Encoding);
  JSONParam.ParamName := 'Result';
  JSONParam.ObjectD…

Replies: 10 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@Hawkinks
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Hawkinks
Comment options

You must be logged in to vote
2 replies
@Hawkinks
Comment options

@Hawkinks
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Hawkinks
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Hawkinks
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants