Skip to content

Commit

Permalink
Added Req.Host, Req.PathInfo, Req.ContentType
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Feb 14, 2023
1 parent 413a104 commit ae4b30f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Horse.Request.pas
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ THorseRequest = class
function Cookie: THorseCoreParam;
function ContentFields: THorseCoreParam;
function MethodType: TMethodType;
function ContentType: string;
function Host: string;
function PathInfo: string;
function RawWebRequest: {$IF DEFINED(FPC)}TRequest{$ELSE}TWebRequest{$ENDIF};
property Sessions: THorseSessions read FSessions;
constructor Create(const AWebRequest: {$IF DEFINED(FPC)}TRequest{$ELSE}TWebRequest{$ENDIF});
Expand Down Expand Up @@ -128,6 +131,21 @@ function THorseRequest.Headers: THorseCoreParam;
result := FHeaders;
end;

function THorseRequest.Host: string;
begin
Result := FWebRequest.Host;
end;

function THorseRequest.ContentType: string;
begin
Result := FWebRequest.ContentType;
end;

function THorseRequest.PathInfo: string;
begin
Result := FWebRequest.PathInfo;
end;

procedure THorseRequest.InitializeContentFields;
const
CONTENT_DISPOSITION = 'Content-Disposition: form-data; name=';
Expand Down

0 comments on commit ae4b30f

Please sign in to comment.