REBOL Programming/parse-header

USAGE:Edit

PARSE-HEADER parent data /multiple 

DESCRIPTION:Edit

Returns a header object with header fields and their values

PARSE-HEADER is a function value.

ARGUMENTS:Edit

  • parent -- Default header object (Type: object none)
  • data -- String to parse (Type: any-string)

REFINEMENTS:Edit

  • /multiple -- Obsolete. Here for compatibility only.

SOURCE CODEEdit

parse-header: func [
    {Returns a header object with header fields and their values} 
    parent [object! none!] "Default header object" 
    data [any-string!] "String to parse" 
    /multiple "Obsolete. Here for compatibility only."
][
    clear invalid 
    template: parent 
    any [
        parse/all data message 
        net-error "Headers not correctly parsed"
    ] 
    make either parent [parent] [object!] head-list
]
Last modified on 31 October 2012, at 16:39