HttpWatch Automation Reference - 16.2.2
HttpWatch Namespace / Log Class / ExportHAREx Method
The name of the file to which the HAR export should be written.

The major version of the HAR spec to be used. Currently, this must be set to 1.

Alternatively, use zero to indicate the latest version of the HAR spec supported by HttpWatch.

The minor version of the HAR spec to be used. Currently, this must be set to 1 or 2 when majorVersion is 1.

This value is ignored if majorVersion is set to zero.

The maximum size of textual content in bytes that should be exported to the HAR file. Bodies larger than this limit are excluded. A value of zero excludes bodies larger than zero bytes.

Use -1 to export all textual content regardless of size.

The maximum size of binary content in bytes that should be exported to the HAR file. Bodies larger than this limit are excluded. A value of zero excludes bodies larger than zero bytes.

Use -1 to export all binary content regardless of size.


In This Topic
    ExportHAREx Method
    In This Topic
    Provides control over how the log is exported in the HTTP Archive (HAR) format .
    Syntax
    'Declaration
     
    Public Sub ExportHAREx( _
       ByVal fileName As String, _
       ByVal majorVersion As Integer, _
       ByVal minorVersion As Integer, _
       ByVal maxTextBodySize As Integer, _
       ByVal maxBinaryBodySize As Integer _
    ) 
    public void ExportHAREx( 
       string fileName,
       int majorVersion,
       int minorVersion,
       int maxTextBodySize,
       int maxBinaryBodySize
    )

    Parameters

    fileName
    The name of the file to which the HAR export should be written.
    majorVersion

    The major version of the HAR spec to be used. Currently, this must be set to 1.

    Alternatively, use zero to indicate the latest version of the HAR spec supported by HttpWatch.

    minorVersion

    The minor version of the HAR spec to be used. Currently, this must be set to 1 or 2 when majorVersion is 1.

    This value is ignored if majorVersion is set to zero.

    maxTextBodySize

    The maximum size of textual content in bytes that should be exported to the HAR file. Bodies larger than this limit are excluded. A value of zero excludes bodies larger than zero bytes.

    Use -1 to export all textual content regardless of size.

    maxBinaryBodySize

    The maximum size of binary content in bytes that should be exported to the HAR file. Bodies larger than this limit are excluded. A value of zero excludes bodies larger than zero bytes.

    Use -1 to export all binary content regardless of size.

    Remarks

    The ExportHAR method is the equivalent of calling ExportHAREx with the following parameters:

     

    ExportHAR/ExportHAREx methods
    Copy Code
    // Calling ExportHAREx requesting the latest version, no limit on textual content size
    // and binary content less than 50 KB
    log.ExportHAREx( fileName, 0, 0, -1, 50 * 1024);
    // Is the equivalent to calling ExportHAR
    log.ExportHAR( fileName);
    

     

     

    Requirements
     
    See Also