HTTPParam
I add an HTTP param to an HTTP call.
Component Signature
<bx:HTTPParam type=[string]
name=[string]
value=[any]
file=[string]
encoded=[boolean]
mimetype =[string] />
Attributes
Atrribute
Type
Required
Description
Default
type
string
true
The type of parameter: header, body, xml, cgi, file, url, formfield, cookie
name
string
false
The name of the parameter (not required for body, xml, or file types)
value
any
false
The value of the parameter (not required for file type)
file
string
false
The path to the file (required for file type)
encoded
boolean
false
Whether the value is URL encoded. Applies to CGI Params and Form Fields (default: false). If passed as false to a URL param, it will bypass the default encoding that occurs.
mimetype
string
false
Examples
Script Syntax
bx:http method="POST" charset="utf-8" url="https://www.google.com/" result="result" {
bx:httpparam name="q" type="formfield" value="bx";
}
writeDump( result );
BX:HTTP Tag Syntax
<bx:http result="result" method="POST" charset="utf-8" url="https://www.google.com/">
<bx:httpparam name="q" type="formfield" value="bx">
</bx:http>
<bx:dump var="#result#">
Last updated
Was this helpful?