[ipxe-devel] request POST to https://rom-o-matic.eu/

Geert Stappers stappers at stappers.nl
Mon Apr 24 17:40:59 UTC 2017


On Mon, Apr 24, 2017 at 01:39:15AM +0300, ???????????? ?????????? wrote:
> Hello, 
> 
> I'm programming on a python.
> I'm trying to make a request to your server, do not tell me what data structure should be?
> 
> my example don't work:
>     sendRequest = requests.post("https://rom-o-matic.eu/", verify=False, data={'wizardtype': 'standard', 'outputformatstd': 'bin/ipxe.usb', 'embed': '#!ipxedhcp route set iscsi-rootfs iscsi:192.1.1.1:::1:iqn:machine01 set keep-san 1 sanboot --drive 0x80 ${iscsi-rootfs}', 'gitrevision': 'master'})
> 

#!/usr/bin/env python

import requests

data = {
   'wizardtype': 'standard',
   'outputformatstd': 'bin/ipxe.usb',
   'embed': '''#!ipxe
dhcp route
set iscsi-rootfs
iscsi:192.1.1.1:::1:iqn:machine01
set keep-san 1
sanboot --drive 0x80 ${iscsi-rootfs}
''',
   'gitrevision': 'master',
}
response = requests.post( "https://rom-o-matic.eu/", data, verify=False )

print response.status_code
print response.headers

#  do something with response.text
#  do another request
#  save the created ROM

# l l



More information about the ipxe-devel mailing list