python - Need to store values from URL then send this values using post method -


i need store values method send values using post method in form.

how can that? possible?

i values method , works fine, when try use payload in post goes wrong because payload dict doesnt exist in post

if request.method == 'get':                 payload = {                     "sessid": request.get['sessid'],                     "username": request.get['username'],                     "sessionlifetime": session_timeout,                     "idletimeout": idle_timeout,                 }  if request.method == 'post':     logic payload     requests.post(url,payload) 

thanks.

when getting url data can parsed uri. when posting url data must parsed headers.

usually find posted data in 'x-www-form-urlencoded' header


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -