+ super NativeCurlCallbacks
+
+ # Address of the remote resource to request
+ var url: String
+
+ # Data for the body of a POST request
+ var data: nullable HeaderMap is writable
+
+ # Raw body string
+ #
+ # Set this value to send raw data instead of the POST formatted `data`.
+ #
+ # If `data` is set, the body will not be sent.
+ var body: nullable String is writable
+
+ # Header content of the request
+ var headers: nullable HeaderMap is writable
+
+ # Delegates to customize the behavior when running `execute`
+ var delegate: nullable CurlCallbacks is writable
+
+ # Set the user agent for all following HTTP requests
+ var user_agent: nullable String is writable
+
+ # Set the Unix domain socket path to use
+ #
+ # When not null, enables using a Unix domain socket
+ # instead of a TCP connection and DNS hostname resolution.
+ var unix_socket_path: nullable String is writable
+
+ # The HTTP method, GET by default
+ #
+ # Must be a capitalized string with request name complying with RFC7231
+ var method: String = "GET" is optional, writable
+
+ # Execute HTTP request
+ #
+ # By default, the response body is returned in an instance of `CurlResponse`.
+ # This behavior can be customized by setting a custom `delegate`.
+ fun execute: CurlResponse
+ do
+ # Reset libcurl parameters as the lib is shared and options
+ # might affect requests from one another.
+ self.curl.native = new NativeCurl.easy_init
+ if not self.curl.is_ok then return answer_failure(0, "Curl instance is not correctly initialized")
+
+ var success_response = new CurlResponseSuccess
+ var callback_receiver: CurlCallbacks = success_response
+ var err : CURLCode
+
+ # Prepare request
+ err = prepare_request(callback_receiver)
+ if not err.is_ok then return answer_failure(err.to_i, err.to_s)
+
+ # Perform request
+ var err_resp = perform
+ if err_resp != null then return err_resp
+
+ var st_code = self.curl.native.easy_getinfo_long(new CURLInfoLong.response_code)
+ if not st_code == null then success_response.status_code = st_code