Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
var datas: nullable HeaderMap writable = null
var headers: nullable HeaderMap writable = null
+ # Set the user agent for all following HTTP requests
+ fun user_agent=(name: String)
+ do
+ curl.prim_curl.easy_setopt(new CURLOption.user_agent, name)
+ end
+
init (url: String, curl: nullable Curl)
do
self.url = url
new postfields `{ return CURLOPT_POSTFIELDS; `}
# new `{ return CURLOPT_REFERER; `}
# new `{ return CURLOPT_FTPPORT; `}
-# new `{ return CURLOPT_USERAGENT; `}
+ new user_agent `{ return CURLOPT_USERAGENT; `}
# new `{ return CURLOPT_LOW_SPEED_LIMIT; `}
# new `{ return CURLOPT_LOW_SPEED_TIME; `}
# new `{ return CURLOPT_RESUME_FROM; `}