mimeEntityGetHeaderParameterValues

SYNOPSIS

varstrlst mimeEntityGetHeaderParameterValues(mimeEntity entityOrReader,
                                varchar headerName[, varchar paramName])

Parameters:

  • entityOrReader - A mimeEntity or mimeReader object

  • headerName - The varchar name of the header

  • paramName - The optional varchar name of the parameter

Returns:

  • varstrlst list of parameter values from header for given parameter name


DESCRIPTION
The mimeEntityGetHeaderParameterValues function returns the values of parameters named paramName from the header named headerName in the entity, RFC 2047 encoded-word decoded, as a varstrlst list. If paramName is not given or is empty, the first/main value of the header is returned (i.e. the "empty/unnamed" parameter; see example).


EXAMPLE

<$ret = (mimeEntityGetHeaderParameterValues($reader, "Content-Type" ))>
  Content-Type is: $ret
  <$ret = (mimeEntityGetHeaderParameterValues($reader, "Content-Type" ,
      "charset"))>
  Charset is: $ret

Given the entity header "Content-Type: text/html; charset="ISO-8859-1"", the output would be:

Content-Type is: text/html
  Charset is: ISO-8859-1


CAVEATS
The multi-value varstrlst return value will be split into multiple Vortex variable values that can be looped over, but only if <sqlcp arrayconvert> (here) is on (the default).


SEE ALSO
mimeEntityGetHeaderParameterNames


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.