File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ TRALRequest = class(TRALHTTPHeaderInfo)
6767 FMethod: TRALMethod;
6868 FProtocol: StringRAL;
6969 FQuery: StringRAL;
70+ private
71+ procedure ParseQueryParams (const AValue: StringRAL);
7072 protected
7173 // / Grabs the full URL of the request
7274 function GetURL : StringRAL;
@@ -156,6 +158,20 @@ function TRALRequest.GetRequestText: StringRAL;
156158 Result := GetRequestEncText;
157159end ;
158160
161+ procedure TRALRequest.ParseQueryParams (const AValue: StringRAL);
162+ var
163+ sl: TStringList;
164+ begin
165+ sl := TStringList.Create;
166+ try
167+ sl.Delimiter := ' &' ;
168+ sl.DelimitedText := AValue;
169+ Params.AppendParams(sl, rpkQUERY);
170+ finally
171+ FreeAndNil(sl);
172+ end ;
173+ end ;
174+
159175function TRALRequest.GetURL : StringRAL;
160176begin
161177 Result := LowerCase(FHttpVersion) + ' :/' + FixRoute(FHost + ' /' + FQuery);
@@ -169,7 +185,10 @@ procedure TRALRequest.SetQuery(const AValue: StringRAL);
169185
170186 vInt := Pos(' ?' , FQuery);
171187 if vInt > 0 then
188+ begin
189+ ParseQueryParams(Copy(FQuery, vInt + 1 , Length(FQuery)));
172190 Delete(FQuery, vInt, Length(FQuery));
191+ end ;
173192
174193 FQuery := FixRoute(FQuery);
175194end ;
You can’t perform that action at this time.
0 commit comments