<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 28 January 2015 at 14:53, Carlos Catucci <span dir="ltr"><<a href="mailto:carlos.catucci@gmail.com" target="_blank">carlos.catucci@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Fai una GET e non una POST, lasciando data. </blockquote></div><br></div><div class="gmail_extra">Nulla e' cambiato, ne scrivendo <br><br><br>>>> param = {'script':'biglietti_da_visita.js', 'data_modifica':'21112014_0907'}<br>>>> data = dict(func='getPreventivo', name='preventivo', param=param)<br>>>> r2 = s.get(url2, data=data)<br>>>> print r2.text<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">ne facendo<br><br>>>> param = {'script':'biglietti_da_visita.js', 'data_modifica':'21112014_0907'}<br>>>> data = dict(func='getPreventivo', name='preventivo', param=param)<br>>>> prepared = requests.Request(url=url2).prepare()<br>>>> prepared.prepare_url(prepared.url, data)<br>>>> r2 = s.get(prepared.url)<br>>>> print r2.text<br><br></div><div class="gmail_extra">eppure guardando dal debugger del browser ottengo<br><br><ol class="" tabindex="0" style="list-style-type:none;margin:0px;outline:medium none;color:rgb(48,57,66);font-family:Ubuntu,Arial,sans-serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)"><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div class="" style="color:rgb(84,84,84);display:inline-block;margin-right:0.5em;font-weight:bold;vertical-align:top;white-space:pre-wrap">Request Method:</div><div class="" style="font-family:"dejavu sans mono",monospace;white-space:pre-wrap;font-size:11px!important;display:inline;margin-right:1em;word-break:break-all;margin-top:1px">POST</div></li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word"><div class="" style="color:rgb(84,84,84);display:inline-block;margin-right:0.5em;font-weight:bold;vertical-align:top;white-space:pre-wrap">Status Code:</div><div class="" style="font-family:"dejavu sans mono",monospace;white-space:pre-wrap;font-size:11px!important;display:inline;margin-right:1em;word-break:break-all;margin-top:1px">200 OK</div></li></ol><ol class="" style="margin:0px;min-width:100%;padding:2px 6px!important;list-style-type:none;display:block;color:rgb(48,57,66);font-family:Ubuntu,Arial,sans-serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)"><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word;white-space:nowrap"><b>Form Data</b><br></li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word;white-space:nowrap"><div class="" style="color:rgb(84,84,84);display:inline-block;margin-right:0.5em;font-weight:bold;vertical-align:top;white-space:pre-wrap">func:</div><div class="" style="font-family:"dejavu sans mono",monospace;white-space:pre-wrap;font-size:11px!important;display:inline;word-break:break-all;margin-top:1px;margin-left:1em">getPreventivo</div></li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word;white-space:nowrap"><div class="" style="color:rgb(84,84,84);display:inline-block;margin-right:0.5em;font-weight:bold;vertical-align:top;white-space:pre-wrap">name:</div><div class="" style="font-family:"dejavu sans mono",monospace;white-space:pre-wrap;font-size:11px!important;display:inline;word-break:break-all;margin-top:1px;margin-left:1em">preventivo</div></li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word;white-space:nowrap"><div class="" style="color:rgb(84,84,84);display:inline-block;margin-right:0.5em;font-weight:bold;vertical-align:top;white-space:pre-wrap">param[script]:</div><div class="" style="font-family:"dejavu sans mono",monospace;white-space:pre-wrap;font-size:11px!important;display:inline;word-break:break-all;margin-top:1px;margin-left:1em">biglietti_da_visita.js</div></li><li title="" style="padding:0px 0px 0px 14px;margin-top:1px;word-wrap:break-word;white-space:nowrap"><div class="" style="color:rgb(84,84,84);display:inline-block;margin-right:0.5em;font-weight:bold;vertical-align:top;white-space:pre-wrap">param[data_modifica]:</div><div class="" style="font-family:"dejavu sans mono",monospace;white-space:pre-wrap;font-size:11px!important;display:inline;word-break:break-all;margin-top:1px;margin-left:1em">21112014_0907</div></li></ol><p>per cui deve essere possibile passare i parametri in quel modo li.<br></p><p>Per aiutare, <br></p><p>>>> print r2 <br></p>torna <br><br><Response [200]><br><br></div><div class="gmail_extra">quindi il WebServce riceve la chiamata e reagisce bene solo che non riconoscendo la struttura torna vuoto (o meglio 8 blank spaces)<br></div><div class="gmail_extra">Ah ho appena povato a encodare in json data quando lo passo alla perapred.prepare_ur, nessun apprezzabile cambiamento<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Carlos<br></div><div class="gmail_extra">-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">EZLN ... Para Todos Todo ... Nada para nosotros<br></div></div></div></div>
</div></div>