This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
cmd:param [2013/08/19 22:17] mcb30 |
cmd:param [2023/03/01 12:30] mcb30 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Add form parameter ====== | + | ====== Add request parameter ====== |
===== Synopsis ===== | ===== Synopsis ===== | ||
- | param [--params <params>] <key> <value> | + | param [--params <params>] [--header] <key> <value> |
===== Examples ===== | ===== Examples ===== | ||
Line 13: | Line 13: | ||
param uuid ${uuid} | param uuid ${uuid} | ||
param asset ${asset} | param asset ${asset} | ||
+ | chain http://boot.ipxe.org/demo/boot.php##params | ||
+ | |||
+ | === Use a custom HTTP header === | ||
+ | |||
+ | params | ||
+ | param --header Referer http://www.example.com | ||
chain http://boot.ipxe.org/demo/boot.php##params | chain http://boot.ipxe.org/demo/boot.php##params | ||
===== Description ===== | ===== Description ===== | ||
- | Add a form parameter with the specified key/value pair. If no form parameter list is specified, the default (unnamed) form parameter list will be used. | + | Add a request parameter with the specified key/value pair. If no request parameter list is specified, the default (unnamed) request parameter list will be used. If the ''--header'' option is specified then the parameter will be treated as a header parameter, otherwise the parameter will be treated as a form parameter. |
===== Command status ===== | ===== Command status ===== | ||
- | ^ Success | The form parameter was successfully added | | + | ^ Success | The request parameter was successfully added | |
- | ^ Failure | The form parameter was not successfully added | | + | ^ Failure | The request parameter was not successfully added | |
===== See also ===== | ===== See also ===== | ||
Line 36: | Line 42: | ||
===== Notes ===== | ===== Notes ===== | ||
- | The most common use for form parameter lists is to generate HTTP POST requests. You can generate a POST request by appending ''##params'' to the HTTP URI. For example, to send a complete PCI device listing: | + | The most common use for request parameter lists is to generate HTTP POST requests. You can generate a POST request by appending ''##params'' to the HTTP URI. For example, to send a complete PCI device listing: |
#!ipxe | #!ipxe | ||
Line 47: | Line 53: | ||
chain http://192.168.0.1/boot/pcilist.php##params | chain http://192.168.0.1/boot/pcilist.php##params | ||
- | You must create the form parameter list using the ''[[:cmd:params]]'' command before attempting to create a form parameter using the ''param'' command. | + | You must create the request parameter list using the ''[[:cmd:params]]'' command before attempting to create a request parameter using the ''param'' command. |