D etc.

D, being a lesser-known group language, is very little suitable for it in the way of libraries. I am trying to upload a file, and the way I can do this is with DMD 2 and phobos with etcc.curl, but ... Curl is very difficult to use. And since I can not find a good example anywhere. How to upload a file in the easiest way using etcc.curl?

+5
source share
1 answer

I don't know very much about the etc.c.curl API, which is simply tied to the C Curl library. However, it is much easier to use the D-style wrapper at this time in the official review and is likely to find its way into one of the next two releases of Phobos / DMD. If you want to try this in average time (on the understanding that there may be changes in it caused by the review process), see

https://github.com/jcd/phobos/blob/curl-wrapper/etc/curl.d (code)

http://freeze.steamwinter.com/D/web/phobos/etc_curl.html (Documentation)

If you don't want to use a wrapper with this bleeding edge, you can also look at the code to figure out how to accomplish what you want to accomplish using the etc.c.curl C binding.

+6
source

All Articles