Вниз
Скачать: CL | DM;

Как достать запрашиваемый URL из GET (http) ?   Найти похожие ветки 

← →
Makhanev Alexander   (2007-06-18 14:52) [0]

у меня есть вся команда GET,
требуется получить запрашиваемый браузером URL.

я так понял, что надо совместить то что лежит в HOST с тем что указано в GET.

свой парсер написать не проблема, но вдруг я упущу какие-то случаи...

поэтому, буду рад, если кто даст линк\код готового парсера http команды get который мне вернет url.


← →
Орион ©   (2007-06-18 15:16) [1]

 TDemiurgeCommandParser = class
 private
   FText,
   FURI,
   FProtoVersion,
   FCommand: string;
   function GetText: string;
   procedure SetText(const Value: string);
 public
   constructor Create(ACommandText: string);
   property Command: string read FCommand write FCommand;
   property URI: string read FURI write FURI;
   property ProtoVersion: string read FProtoVersion write FProtoVersion;
   property Text: string read GetText write SetText;
 end;

{ TDemiurgeCommandParser }

constructor TDemiurgeCommandParser.Create(ACommandText: string);
begin
 inherited Create;
 Text:=ACommandText;
end;

function TDemiurgeCommandParser.GetText: string;
begin
 Result:=FCommand+" "+FURI+" "+FProtoVersion;
end;

procedure TDemiurgeCommandParser.SetText(const Value: string);
var
 CommandText: string;

 function Extract(var AText: string): string;
 begin
   Result:=Fetch(AText, " ");
   AText:=TrimLeft(AText);
 end;

begin
 FText:=Value;
 CommandText:=Value;
 FCommand:=Extract(CommandText);
 FURI:=Extract(CommandText);
 FProtoVersion:=CommandText;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.011 c
15-1202184216
Dmitry S
2008-02-05 07:03
2008.03.16
проигрывание midi


15-1202284554
boriskb
2008-02-06 10:55
2008.03.16
К АП


2-1203185365
guav
2008-02-16 21:09
2008.03.16
Хитрые структуры данных.


2-1203380868
Максим
2008-02-19 03:27
2008.03.16
ошибка пр иработе с плагином


2-1203123909
Artem
2008-02-16 04:05
2008.03.16
Изменение текста в WebBrowser без сохранения на диск




   Наверх