iPXE discussion forum

Full Version: iPXE HTTP GET
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Can or are their plans for iPXE to support an HTTP get, we have a web service where we pass the UUID to it and it will return either blank of a value. Depending on the value returned alters the way the end client will boot.

I've been through the commands it doesn't look like i'm in luck.

Thanks

Simon
The default HTTP mode in iPXE is GET

Example with loots of parameters.
cpuid --ext 29 && set arch amd64 || set arch x86
set menu-url ${boot-url}/pxe.php?mac=${netX/mac:hexhyp}&bus=${netX/busid:hexhyp}&chip=${netX/chip:uristring}&ip=${netX/ip}&next-server=${next-server}&arch=${arch}&platform=${platform:uristring}

imgfetch -a ${menu-url}&mlog&error=${errno}&class=${user-class:uristring}&manuf=${manufacturer:uristring}&prod=${product:uristring}&sn=${serial:uristring}&boardsn=${board-serial:uristring}&asset=${asset:uristring}&uuid=${uuid:uristring}&ver=${version:uristring} ||
imgfree ||

chain -ar ${menu-url}&boot&hostname=${hostname:uristring} | shell
Thanks for the reply, the critical thing I should have mentioned is that it would be connecting to a Windows webservice that would return the value. We don't use php in our Bank.
PHP was just an example, you can use .NET as an replacement, it doesn't change the principle.

How do you expect the URL to look, or what kind of code do you have that should consume the information on server side? I assume the server is returning an ipxe script?
Hi

For example we would call http://servername:4011/0123456789abcdef0123456789abcdee

and it returns

WDSServerName\Setup\English\Windows\x64\i386\templates\startrom.0
(2015-03-24 16:04)sdlewis Wrote: [ -> ]For example we would call http://servername:4011/0123456789abcdef0123456789abcdee

and it returns
WDSServerName\Setup\English\Windows\x64\i386\templates\startrom.0

Then you will have to create an intermediate service that transforms the returned value into a script so what is returned is in total
Code:
#!ipxe
chain WDSServerName\Setup\English\Windows\x64\i386\templates\startrom.0
You might have to change the slashes as well.
Reference URL's