how i can pass memo lines strings to TRecords
fields to use theme as a parameters for idHTTP POST methode?
usually id do it like this
for i := 0 to Memo1.Lines.Count-1 do
begin
P := Pos('+', Memo1.Lines.Strings[i]);
Email:= Copy(Memo2.Lines.Strings[i], 1, P-1);
Name:= ExtractName(Memo2.Lines.Strings[i]);
lPOSt // HTTP POST; //Email&Name Global Var for HTTP post Params
Sleep(1000);
end;
but in pipeline pattern i have to use records , so i can pass the parameters to the queue. Or is there any way to use Email
and Name
as parameters for for POST method?
Reply := TStringList.Create;
Params.Add('Email=' + Email); // Email is Global Var
Params.Add('Name=' + Name); // Name is Global Var
lHTTP.Post('http://www.mywebserverx.com/', Params);
type
TRecords = record
Name : string;
eMail : string;
Car: string;
end;
My pipeline code, using HTTP Get
procedure TForm2.StartButtonClick(Sender: TObject);
var
s : string;
urlList : TStrings;
begin
urlList := Memo1.Lines;
pipeline := Parallel.Pipeline;
pipeline.Stage(Retriever).NumTasks(10).Run;
// Retriever>>>idHTTP GET opertaion
//how to modify the pipeline input after using records as Params?
for s in urlList do
pipeline.Input.Add(s);
pipeline.Input.CompleteAdding;
any help is appreciated.