cfboom.http

Class HttpHeaders

lucee.Component
    extended by cfboom.lang.Object
      extended by cfboom.http.HttpHeaders
Class Attributes:
  • output : false
  •  
  • displayname : Class HttpHeaders
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init()
    Method Summary
    numeric getContentLength()
         Return the length of the body in bytes, as specified by the.
    string getFirst(string headerName)
         Return the first header value for the given header name, if any.
    void set(string headerName, string headerValue)
         Set the given, single header value under the given name.
    void setContentLength(numeric contentLength)
         Set the length of the body in bytes, as specified by the.
     
    Methods inherited from class cfboom.lang.Object
    $equals, getComponentName, getIdentityHashCode, getIdentityString, getMeta, hashCode, toString
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()


    Method Detail

    getContentLength

    public numeric getContentLength()

    Return the length of the body in bytes, as specified by the {@code Content-Length} header.

    Returns -1 when the content-length is unknown.


    getFirst

    public string getFirst(string headerName)

    Return the first header value for the given header name, if any.

    Parameters:
    headerName
    Returns:
    the first header value, or {@code null} if none

    set

    public void set(string headerName, string headerValue)

    Set the given, single header value under the given name.

    Parameters:
    headerName
    headerValue
    Throws:
    UnsupportedOperationException if adding headers is not supported

    setContentLength

    public void setContentLength(numeric contentLength)

    Set the length of the body in bytes, as specified by the {@code Content-Length} header.

    Parameters:
    contentLength