Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sugestão ReadTimeOut #411

Open
trainneEg7 opened this issue Nov 21, 2024 · 0 comments
Open

Sugestão ReadTimeOut #411

trainneEg7 opened this issue Nov 21, 2024 · 0 comments

Comments

@trainneEg7
Copy link

Bom dia,

Ocorreu uma situação pra mim e precisei configurar o ReadTimeOut da conexão da requisição, mas nao encontrei parametros no Horse,
poderia ser verificado?

Algo semelhante:

WebServer := TIdHTTPServer.Create(nil);
WebServer.SessionState := false;
WebServer.KeepAlive := false;
WebServer.OnCommandGet := CustomOnCommandGet;

procedure CustomOnCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo;
begin
AContext.Connection.Socket.ReadTimeout := 60000; # ReadTimeout
AResponseInfo.ContentStream := TFileStream.Create('C:/file.zip', fmOpenRead or fmShareCompat);
end;

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant