- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
помогиÑе победиÑÑ ÐºÐ¾Ð´Ð¸ÑовоÑкопÑоблеминÑ
о!
if SameText(ARequestInfo.RawHeaders.Values['X-Requested-With'], // ÐºÐ»Ð¸ÐµÐ½Ñ Ð¿Ð¾Ð»ÑÑÐ¸Ñ ÑÑÐ°Ð³Ð¼ÐµÐ½Ñ html, полное обновление не нÑжно
'XMLHttpRequest') then
begin
if SameText(ARequestInfo.Command, 'GET') then
begin
AResponseInfo.ContentText := http.Get(Link); // ÑолÑко Ð´Ð»Ñ ÑеÑÑа. ниже более ÑмеÑÑнÑй код.
// AResponseInfo.ContentStream := TStringStream.Create; // жизнÑÑ Ð¾Ð±ÑекÑа ÑпÑавлÑÐµÑ Ð²Ð»Ð°Ð´ÐµÐ»ÐµÑ
// http.Get(ARequestInfo.URI, AResponseInfo.ContentStream);
end
else if SameText(ARequestInfo.Command, 'POST') then
begin
// AResponseInfo.ContentStream := TStringStream.Create;
ARequestInfo.PostStream := TMemoryStream.Create;
ARequestInfo.Params.SaveToStream(ARequestInfo.PostStream);
http.Request.CharSet := AResponseInfo.CharSet;
http.Request.ContentType := AResponseInfo.ContentType;
http.Request.ContentLength := ARequestInfo.PostStream.Size;
AResponseInfo.ContentText := http.Post(Link, ARequestInfo.Params); // оÑпÑавлÑÐµÑ Ð²ÐµÑно, но Ñ ÐºÐ¾Ð´Ð¸ÑовкопÑоблемами
// ARequestInfo.PostStream:=Nil;
// AResponseInfo.ContentStream);
// HTTP.POST(Link, ARequestInfo.Params, AResponseInfo.ContentStream); // Ñ
ÑÑÑÐ¸Ñ ÑоÑÐ¼Ñ Ð´Ð»Ñ Ð¾ÑпÑавки, доÑ
одÑÑ Ð»Ð¸ÑÑ ÑÑагменÑÑ
end;
end
else
p.s.: а дыра у тебя, судя по всему, в жопе.