session. Creating cURL session

^curl:session{code

Method creates a curl session. The code of the method is processed by Parser within current session.
In one session common options sould be specified and a number of file loads could be executed. If the server is supporded
keep-alive, all requests within the session will be done in one HTTP-connection.

Example
^curl:session{
   ^curl:options[
      $.url[https://store.artlebedev.ru/]
      $.charset[UTF-8]
      $.timeout(10)
      $.ssl_verifypeer(0)
   
]

   $file1[^curl:load[ 
      $.url[https://store.artlebedev.ru/login/]
      $.postfields[Username=^taint[uri][$form:login]&Password=^taint[uri][$form:password]&btnSubmit=^taint[uri][
Enter]]
   ]]

   $file2[^curl:load[]]
}






Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 23.06.2012