Root > Integral parts > Options > Report sending page > HTTP upload

HTTP upload

Previous pageReturn to chapter overviewNext page   

This is setup options for HTTP upload send method (wsmHTTP). They are located at Sending tab.


Note: HTTP upload can be used to send bug reports to a facade for a bug tracker. See example for FogBugz. See example for Jira. See generic examples.



HTTP upload send method options


1. "URL" (.SendHTTPURL) option specifies target URL for file upload. Usually, it's script name on web server. See description of HTTP upload method for discussion of upload scripts. Do not add here "http://" or ":80" parts here. Specify only domain name (or IP), path and script name. Example:


Warning: be sure to setup adequate maximum upload file limits in your web-server/script configuration. Otherwise sending may fail on large bug reports.



2. "Port" (.SendHTTPPort) option specifies HTTP port on web server. It's 80 by default. Other common value is 8080. For SSL/TLS it's usually 443.



3. "SSL / TLS" (.SendHTTPSSL) option enabled secure mode (HTTPS protocol). Don't forget to adjust port number, if you change this checkbox.



4. "Method" (.SendHTTPMethod) option specifies type of HTTP request being sent. Default is 'POST'. Please, refer to your receiving side (e.g. script at the specified URL) to learn which method should be used.



4. "BasicAuth" (.SendHTTPAuthLogin, .SendHTTPAuthPassword) options specify account details for Basic-Auth type authentication. Usually these fields are blank. Fill them, if you use Basic-Auth on your web server.


Warning: your real account's data will be stored inside application. Even if it's encrypted - it's still stored inside .exe, so it can be stolen. Create a new special account for bug reporting via this method. See also: Security Considerations.



6. "Proxy" (.SendHTTPProxyHost, .SendHTTPProxyPort, .SendHTTPProxyLogin, .SendHTTPProxyPassword) options specify proxy details. You can leave them blank to use system-provided settings. Or you can fill these values to set custom proxy.



7. "HTTP Headers" (.SendHTTPHeaders) option specifies additional HTTP headers to pass to the server on the specified URL. Each header must be placed on standalone line. Field name and value are separated by the ': ' ('colon' and 'space') characters.


These may be required by your receiving side. For example, if you are going to send bug report to Jira - you may use something like:



Content-Type: application/x-www-form-urlencoded;charset=utf-8

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Sec-Fetch-Site: same-origin

Sec-Fetch-Mode: navigate

Sec-Fetch-User: ?1

Sec-Fetch-Dest: iframe



You can also specify headers in the OnCustomWebFieldsRequest event handler. For example:


  EEvents, EConsts;
procedure SetHTTPHeaders(const ACustom: Pointer; AExceptionInfo: TEurekaExceptionInfo;
  ASender: TObject; AWebFields: TStrings; var ACallNextHandler: Boolean);
  AWebFields.Values[sifHTTPHeaders + 'Origin'] :=

  AWebFields.Values[sifHTTPHeaders + 'Content-Type'] :=

  AWebFields.Values[sifHTTPHeaders + 'Sec-Fetch-Site'] :=

  AWebFields.Values[sifHTTPHeaders + 'Sec-Fetch-Mode'] :=

  AWebFields.Values[sifHTTPHeaders + 'Sec-Fetch-User'] :=

  AWebFields.Values[sifHTTPHeaders + 'Sec-Fetch-Dest'] :=

  AWebFields.Values[sifHTTPHeaders + 'Referer'] :=

  // Define HTTP headers
  RegisterEventCustomWebFieldsRequest(nil, SetHTTPHeaders);


Important Note: if you override the Content-Type header with the application/x-www-form-urlencoded value - EurekaLog will send web fields, but will not upload any files. That is because application/x-www-form-urlencoded does not support file attaches. If you are going to use application/x-www-form-urlencoded - you will need to upload files by other means. A practical example can be found here.



8. "HTML Fields" (.SendHTTPFields) option specifies static web-form fields to send. Each field must be placed on standalone line. Field name and value are separated by the '=' ('equal') character.


Typically you would use OnCustomWebFieldsRequest event handler to set up web fields. However, if you have bunch of static fields (such as project ID, etc.) - you can set those here.


Fields names and values depend on your receiving URL. For example, when using HTTP upload to post bugs to FogBugz, you can put the following static fields here:











and then use the following code to set dynamic fields:



  EEvents, ETypes, EConsts, EClasses, ESend, ESendWeb, ESendWebHTTP;


procedure SetCustomFields(const ACustom: Pointer; AExceptionInfo: TEurekaExceptionInfo; 

  ASender: TObject; AWebFields: TStrings; var ACallNextHandler: Boolean);


  Options: TEurekaModuleOptions;

  AttachedFiles: TStringList;


  Options := nil;

  AttachedFiles := TStringList.Create;


    if ASender is TELUniversalSender then


      Options := TELUniversalSender(ASender).Options;




      Options := TEurekaModuleOptions.Create('');


    // hidden fields:

    AWebFields.Values['dblTimeStamp'] := FloatToStr(Now);


    // fixed fields:

    AWebFields.Values['sTitle'] := ComposeTitle(Options);

    AWebFields.Values['sEvent'] := ComposeMessage(Options);

    AWebFields.Values['sCustomerEmail'] := Options.CustomField[sifUserEMail];

    AWebFields.Values['sVersion'] := Options.CustomField[sifBugAppVersion];

    AWebFields.Values['sComputer'] := Options.CustomField[sifMachineID];

    AWebFields.Values['nFileCount'] := IntToStr(AttachedFiles.Count);

    Options.CustomField[sifHTTPFileNameTemplate] := 'File%d';




    if not (ASender is TELUniversalSender) then






  RegisterEventCustomWebFieldsRequest(nil, SetCustomFields);




See also:

HTTP upload send method for general description of this send method

Send feedback... Build date: 2022-03-28
Last edited: 2021-04-27
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: