Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First things first, you'd need to read the http response code (it would have been useful to include that in your question).</p> <p>In the absence of that I've used the Indy http object before as shown below. I included the parameters in my URL though. To troubleshoot, try running this with an http.Get to ensure the port is open, and you can actually connect to the server. Here's my example for completenes:</p> <pre><code>// parameters params := format('export=1&amp;format=%s&amp;file=%s', [_exportType, destination]); // First setup the http object procedure TCrystalReportFrame.SetupHttpObject(); begin try IDHTTP1.HandleRedirects := TRUE; IDHTTP1.AllowCookies := true; IDHTTP1.Request.CacheControl := 'no-cache'; IdHTTP1.ReadTimeout := 60000; _basePath:= GetBaseUrl; except on E: Exception do begin Global.LogError(E, 'SetupHttpObject'); end; end; end; // Then have an onwork event procedure TCrystalReportFrame.HttpWork(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); var Http: TIdHTTP; ContentLength: Int64; Percent: Integer; begin Http := TIdHTTP(ASender); ContentLength := Http.Response.ContentLength; end; // The actual process procedure TCrystalReportFrame.ProcessHttpRequest(const parameters: string); var url : string; begin try try SetupHttpObject; IdHTTP1.OnWork:= HttpWork; url := format('%s&amp;%s', [_basePath, parameters]); url := IdHTTP1.Post(url); except on E: Exception do begin Global.LogError(E, 'ProcessHttpRequest'); end; end; finally try IdHTTP1.Disconnect; except begin end; end; end; end; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload