Bug 18298 – curl high level form wrapper

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-01-25T17:39:44Z
Last change time
2024-12-01T16:32:12Z
Assigned to
No Owner
Creator
Andre
Moved to GitHub: phobos#10297 →

Comments

Comment #0 by andre — 2018-01-25T17:39:44Z
It would be great if std.net.curl could be enhanced with an high level wrapper for form posts (multipart/form-data). A low level curl example you can see here: https://curl.haxx.se/libcurl/c/postit2.html
Comment #1 by greensunny12 — 2018-02-03T15:07:44Z
This is essentially a WONTFIX. Use requests: https://github.com/ikod/dlang-requests We should add a note to the docs though.
Comment #2 by greensunny12 — 2018-02-03T15:24:54Z
Comment #3 by andre — 2018-02-03T20:14:20Z
I have a quite uncommon issue with the package "request". I work for a company which has rules how open source software can be used. Each software component needs to go through an open source process. Also each dependency needs to go through this process. And if the version of a dependency is changed I have to go through this process again. request has in its standard configuration only 1 dependency. But "dub" build will cause the download also of the dependencies of the vibe.d configuration. In the end, this behavior of dub causes me to go through the process of all none needed dependencies: Fetching libevent 2.0.2+2.0.16 (getting selected version)... Fetching diet-ng 1.4.4 (getting selected version)... Fetching requests 0.6.0 (getting selected version)... Fetching botan-math 1.0.3 (getting selected version)... Fetching openssl 1.1.6+1.0.1g (getting selected version)... Fetching botan 1.12.9 (getting selected version)... Fetching eventcore 0.8.27 (getting selected version)... Fetching memutils 0.4.9 (getting selected version)... Fetching vibe-d 0.8.2 (getting selected version)... Fetching vibe-core 1.3.0 (getting selected version)... Fetching libasync 0.8.3 (getting selected version)... Fetching taggedalgebraic 0.10.9 (getting selected version)... Performing "debug" build using dmd for x86. requests 0.6.0: building configuration "std"... <--------- std build If possible I would like to stay with std.net.curl;) I would like to call the needed curl functions from my user code but that is not possible because the access to curl handle is private. https://forum.dlang.org/thread/[email protected] Could the access to this handle be provided from user code?
Comment #4 by igor.khasilev — 2018-02-05T11:03:52Z
Hello, What you described is known and annoying problem with dub. will the problem with requests fixed if I'll provide also Makefile in distribution, so that you can clone proper tag from github and run make?
Comment #5 by andre — 2018-02-05T19:57:52Z
(In reply to igor.khasilev from comment #4) > Hello, > > What you described is known and annoying problem with dub. > > will the problem with requests fixed if I'll provide also Makefile in > distribution, so that you can clone proper tag from github and run make? Hello Igor, that is really kind of you but unfortunately not possible in my scenario. In full detail: - I have my dub project in an internal enterprise github repository - On every push to master branch a CI process (XMake) is triggered - A d plugin for XMake will build my project using dub build in a standardized way - Within this build process, no connection to the internet (code.dlang.org) is allowed to guarantee always the same build result - Therefore all dependency needed to be included within a local path of the dub project I will check what is the current state of the dub issue. I would prefer a clean straight forward solution. Kind regards André
Comment #6 by robert.schadek — 2024-12-01T16:32:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10297 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB