Interface nsIUploadChannel2Type

Hierarchy

Properties

uploadStreamHasHeaders: boolean

Value of aStreamHasHeaders from the last successful call to explicitSetUploadStream. TRUE indicates the attached upload stream contains request headers.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Clones the upload stream. May only be called in the parent process. aContentLength could be -1 in case the size of the stream is unknown, otherwise it will contain the known size of the stream.

    Parameters

    • aContentLength: number

    Returns nsIInputStream

  • Sets a stream to be uploaded by this channel with the specified Content-Type and Content-Length header values.

    Most implementations of this interface require that the stream: (1) implement threadsafe addRef and release (2) implement nsIInputStream::readSegments (3) implement nsISeekableStream::seek

    Parameters

    • aStream: nsIInputStream

      The stream to be uploaded by this channel.

    • aContentType: string

      This value will replace any existing Content-Type header on the HTTP request, regardless of whether or not its empty.

    • aContentLength: number

      A value of -1 indicates that the length of the stream should be determined by calling the stream's |available| method.

    • aMethod: string

      The HTTP request method to set on the stream.

    • aStreamHasHeaders: boolean

      True if the stream already contains headers for the HTTP request.

    Returns void

Generated using TypeDoc