Hi guys,

Can anybody advice how to retry post request ?

more details:  I make post request (Request(site.com/url_to_post, 
method='POST', body=post_body)), and site sometimes  redirects me to some 
"error_page" (I am not sure if it's 301 or something else. i think it 
doesn't matter ), so I get response.url like 'site.com/error.hml' and 
'request.meta['redirect_urls'] contains 'site.com/url_to_post'. I think 
about creating middleware which would be check response.url (if it's 
error.html) and retry request. But the problem is that I need "post_body" 
insie this middleware to be able to retry the same post request. I haven't 
found any way to get it. The only way it's to pass post_body to "meta" and 
get it inside middleware. Is there any better solution ?

-- 
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to scrapy-users+unsubscr...@googlegroups.com.
To post to this group, send email to scrapy-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to