Re: How to keep an authorized connection session?

2016-09-01 Thread Garry_Galler
**OderWat** > I guess that grab is recording cookies and send them back like a web browser > does it Yes, that's exactly what he does. **_tulayang**, Indeed, what we should do: take the cookies out of the Set-Cookie header, and then send them to the server in the Cookie header. My habit to do

Re: How to keep an authorized connection session?

2016-09-01 Thread _tulayang
You should write a session API on server with some key-value cache database (such as redis). Then using cookie to transform session state between client and server. Cookie: sid=0123456abcdefg Session API client ---

Re: How to keep an authorized connection session?

2016-09-01 Thread Garry_Galler
...OK. I think, understand what you mean.:)At http\basic authorization does not create any of this session, it directly mimics the browser itself, sending all the authentication information hidden from the user. Question by basic authorization withdrawn.

Re: How to keep an authorized connection session?

2016-09-01 Thread OderWat
EDIT: Was writing while you wrote :) My answer still stands :) Basic-Auth works like that and this possible extension for Nim would just do the same as you do right now. Maintaining sessions for other authorization schemes would be something more special as those come in a multitude of formats

Re: How to keep an authorized connection session?

2016-09-01 Thread Garry_Galler
I'm sorry, OderWat, but I misunderstood your answer.:) I reframe the question: is there a means to support Nim http session, such as the module Grab (python), where the authorization session is maintained automatically, and the user need only once to make login to access the site? Or this functi

Re: How to keep an authorized connection session?

2016-08-31 Thread OderWat
There is nothing like a "login/session" with basic-auth. It is just how it works.

How to keep an authorized connection session?

2016-08-31 Thread Garry_Galler
My program uses httpbasic authorization and for each request pages from the same site every time they repeatedly send the same headers c pair of login: password. Is it possible to save the login session, and do not send headers "Authorization: Basic" & autentificate & "c L" over and over again?