www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - curl_mime_init: How to get curl handle?


I need to send multipart form data using curl. Until now I build 
the message body myself according to the HTML RFC but it is 
getting complex with large files causing Out Of Memory Exceptions.

Low level curl supports multipart form data and I think I copied 
the C headers accordingly. The issue is curl_mime_init needs the 
reference to CURL and it seems I do not get it from std.net.curl: 

curl_mime *curl_mime_init(CURL *easy);

curl_mime* form = null;
auto http = HTTP("");
form = curl_mime_init(http.handle.handle);

Error: struct std.net.curl.Curl member handle is not accessible

Is there a way to get curl_mime_init working?

Kind regards
Jan 25 2018