Set options to tell CURL how to behave. Obj parameter type can be Int, Bool, String, FileWriter, CURLSList.

Property definitions

curl $ NativeCurl :: easy_setopt
	# Set options to tell CURL how to behave. Obj parameter type can be Int, Bool, String, FileWriter, CURLSList.
	fun easy_setopt(opt: CURLOption, obj: Object): CURLCode
	do
		if obj isa Int then return native_setopt_int(opt, obj)
		if obj == true then return native_setopt_int(opt, 1)
		if obj == false then return native_setopt_int(opt, 0)
		if obj isa String then return native_setopt_string(opt, obj.to_cstring)
		if obj isa FileWriter then return native_setopt_file(opt, obj._file.as(not null))
		if obj isa CURLSList then return native_setopt_slist(opt, obj)
		return once new CURLCode.unknown_option
	end
lib/curl/native_curl.nit:86,2--96,4