I have a BeautifulSoup.Tag object which I want to transfer in an http post request.
Specifically this is a request a task in google app engine would perform.
This is the code:
taskqueue.add(url=’/maintenance’, method=’post’, params={‘row’: row})
When I receive the request on the other end, the parameter row is a unicode string. How do I get my original object back? As I undersand json eval won’t work for this kind of object, so is there another solution Am I compelled to pass simple objects only?
Hmmm. Beautiful soup is kind of an evaluator. So I can send the object’s html and the reuse beautiful soup.
I did it this way:
taskqueue.add(url='/maintenance', params={'element': str(myObject)})and then reused soup inside the task itself: