mozilla
Your Search Results

    nsIUploadChannel2

    Please add a summary to this article.
    1.0
    28
    Introduced
    Gecko 1.9.2
    Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

    Method overview

    void explicitSetUploadStream(in nsIInputStream aStream, in ACString aContentType, in long long aContentLength, in ACString aMethod, in boolean aStreamHasHeaders);

    Methods

    explicitSetUploadStream()

    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().
    void explicitSetUploadStream(
      in nsIInputStream aStream,
      in ACString aContentType,
      in long long aContentLength,
      in ACString aMethod,
      in boolean aStreamHasHeaders
    );
    
    Parameters
    aStream
    The stream to be uploaded by this channel.
    aContentType
    This value will replace any existing Content-Type header on the HTTP request, regardless of whether or not its empty.
    aContentLength
    A value of -1 indicates that the length of the stream should be determined by calling the stream's available method.
    aMethod
    The HTTP request method to set on the stream.
    aStreamHasHeaders
    true if the stream already contains headers for the HTTP request.

    Document Tags and Contributors

    Contributors to this page: Sheppy, trevorh
    Last updated by: Sheppy,