Sto cercando di inviare una richiesta HTTP utilizzando HTTParty con alcuni parametri,Rubino HTTParty - ottenere l'URL di reindirizzamento
Esempio:
GET URL: http://example1.com?a=123&b=456
response_to_get = HTTParty.get('http://example1.com?a=123&b=456')
Il REDIRECT_URL per questa particolare richiesta è http://example2.com
Quando ho provato l'URL http://example1.com?a=123&b=456
nel browser, esso reindirizza all'URL previsto con il valore di parametro aggiunto come http://example2.com?c=123trt58
, ma quando l'ho fatto usando HTTParty, ricevo solo una risposta HTML.
Il mio requisito è quello di ottenere l'URL (http://example2.com?c=123trt58) fuori dalla risposta.
Grazie in anticipo.
scelta giusta è res = HTTParty.head ("http://example1.com?a=123&b=456") HTTParty.get scaricherà tutti i contenuti anche questo è il video 100Mb file. –
@ AivilsŠtoss dovresti postare come risposta – Stefan