reset                 package:RCurl                 R Documentation

_G_e_n_e_r_i_c _f_u_n_c_t_i_o_n _f_o_r _r_e_s_e_t_t_i_n_g _a_n _o_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     This generic and the associated method for a CURLHandle allows one
     to reset the state of the Curl object to its default state.  This
     is convenient if we want to reuse the same connection, but want to
     ensure that it is in a particular state.

     Unfortunately, we cannot query the state of different fields in an
     existing Curl handle and so we need to be able to reset the state
     and then update it with any particular settings we would have
     liked to keep.

_U_s_a_g_e:

     reset(x, ...)

_A_r_g_u_m_e_n_t_s:

       x: the object to be reset. For our method, this is an object of
          class  'CURLHandle'.

     ...: additional arguments for methods

_D_e_t_a_i_l_s:

     This calls the C routine 'curl_easy_reset' in libcurl.

_V_a_l_u_e:

     Methods typically return the updated version of the object passed
     to it. This allows the caller to assign the new result to the same
     variable rather than relying on mutating the content of the object
     in place. In other words, the object should not be treated as a
     reference but a new object with the updated contents should be
     returned.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     Curl homepage <URL: http://curl.haxx.se>

_S_e_e _A_l_s_o:

     'getCurlHandle' 'dupCurlHandle'

_E_x_a_m_p_l_e_s:

      h = getCurlHandle()
      curlSetOpt(customrequest = "DELETE")
      reset(h)

