Giles Bathgate
9185dddd99
Implement post overload in std.net.curl
...
This overload provides the ability to send properly escaped
www-form-urlencoded data using an associative array. The data is built into
name value pairs using an Appender!string that reserves 128 bytes per name
value pair. An example was added to the documentation and the existing one
changed as this is the more common use case.
Several corrections to coding style were suggested and corrected.
2016-05-06 09:46:25 +01:00
Matt Kline
5667d57712
toString() on HTTP.StatusLine should be const
...
It's not modifying anything...
2016-04-29 10:47:40 -07:00
Sebastian Wilzbach
3d67cd228c
style fix: space between operators
2016-04-26 22:26:20 +03:00
Steven Schveighoffer
b0acb7a394
Fix remaining import deprecation messages
2016-02-22 16:03:12 -05:00
Martin Nowak
ce2ac192c9
fix incorrect imports/fqn usages
...
- mostly of the form `import a.b : sym; a.b.sym();`, which is wrong b/c
selective imports do not add the module to the current scope
2016-02-20 14:41:44 +01:00
sigod
d278569480
std.net.curl: _basicHTTP: use Appender for collecting of response data
2016-02-19 00:52:54 +03:00
Ryan Frame
5c63480147
Add missing import
...
std.stdio.File is needed in the upload function.
2016-02-05 06:43:47 -05:00
JakobOvrum
8e38e62485
Merge pull request #3853 from 9rnsr/fix12359
...
Fix for issue 12359
2016-01-06 02:37:52 +01:00
k-hara
e864e53adc
fix property enforcement
2015-12-04 15:42:53 +09:00
k-hara
002829967b
Fix curl API load code
...
`__traits(allMembers)` enumerates all members other than struct fields, so instead use `API.tupleof` to list only function pointer fields.
2015-12-03 23:21:51 +09:00
Jonathan M Davis
d34164a2ea
Move some deprecations along.
2015-11-26 00:28:38 -08:00
Walter Bright
cf22992cbb
Merge pull request #3768 from CyberShadow/pull-20151024-051829
...
HTML fixes
2015-10-24 15:05:00 -07:00
Vladimir Panteleev
86cf380007
HTML fixes
2015-10-24 06:19:23 +00:00
Brian Schott
67c95e6de2
Merge pull request #3715 from dcarp/AliasSeq
...
Rename obsolete TypeTuple to AliasSeq
2015-10-16 20:59:56 -07:00
Vladimir Panteleev
28abd12631
Fix test race condition in phobos std.net.curl
2015-10-17 01:05:07 +00:00
Dragos Carp
d698887729
Remove obsolete TypeTuple references
...
Replace following names:
std.typetuple -> std.meta
TypeTuple -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple -> Fields
std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Martin Nowak
512a501e5b
properly decode content-length
...
- split headers and body
- partly parse request header for content-length
and handle 100-continue
- return headers and body separately
- fix missing content-length in patch method
2015-08-30 22:17:58 +02:00
Martin Nowak
9fe6ebceaf
fix clearIfSupported implementation
...
- to clear an option like ssl_ctx that depends
on the compile-time configuration of the used
curl library
- update CurlError enum
obsolete4 was reused as CURLE_NOT_BUILT_IN
- unknown_telnet_option was incorrectly named
(doesn't have anything to do with telnet)
2015-08-25 01:05:12 +02:00
Martin Nowak
ced236fb99
don't clean noprogress when dupping the curl handle
...
- fixes the issue that byLineAsync and byChunkAsync
currently always show the default curl progressbar
2015-08-24 15:16:59 +02:00
Martin Nowak
3e09aa89eb
turn off verbose output in test
2015-08-24 15:16:58 +02:00
Martin Nowak
463d24144d
fix type for content length parameter
...
- curl expects a 64-bit curl_off_t type
- change method from size_t to ulong
- checked conversion using to!curl_off_t
- keep testing for magic size_t.max to not
break code
2015-08-24 15:16:58 +02:00
Martin Nowak
4a496c848c
fix Issue 14938 - std.net.curl tests should use localhost or stub any networking
...
- implement test server on second thread that can be
fed with premade responses and records the requests
- rewrite tests
- fix upload which didn't work at all
2015-08-24 15:16:55 +02:00
Martin Nowak
ceb29a91c0
fix Issue 14877 - std.net.curl needs PATCH http method
...
- use infilesize for anything but post requests
though apparently curl can use both for non-POST
methods
2015-08-23 17:36:36 +02:00
Martin Nowak
2bc204c465
fix docs for HTTP only requests
2015-08-23 17:36:36 +02:00
Martin Nowak
522592c430
[refactor] deduplicate doSend condition
2015-08-23 17:35:51 +02:00
Dmitry Olshansky
354778b430
Merge pull request #3570 from MartinNowak/noDataForOptions
...
remove data argument from options
2015-08-23 08:48:16 +03:00
Martin Nowak
592ce24379
dynamically load libcurl
...
- avoids issues with versioned symbols on different platforms
- lazy loading/initialization of curl library
- fix Issue 13324
- try to load curl from the exe itself before loading a shared library
thus allowing to link against a different or a static curl library
2015-08-22 16:27:45 +02:00
Martin Nowak
9ac2d3c1b0
remove data argument from options
...
- it's unlikely that the non-usage of
OPTIONS body changes anytime soon
2015-08-22 09:34:16 +02:00
Martin Nowak
404c3cd9df
fix Issue 14760 - Clear content-length for libcurl
...
- content-length must be set to allow follow-up
post/put/trace requests with empty body
- reset content-length to 0 after _basicHTTP
2015-08-20 12:28:42 +02:00
Martin Nowak
9fbfb7c40a
Revert "Merge pull request #3464 from karronoli/fix-curl-segv"
...
This reverts commit 70028953a9
, reversing
changes made to e873db6c6c
.
2015-08-20 12:19:31 +02:00
Laeeth Isharc
55c8505576
update curl.d documentation
...
The examples assign the results of curl functions to a string. But that doesn't work on dmd 2.068 running on arch, so I suggest we update them. Please double-check my changes as I made them very quickly as limited time.
2015-08-18 00:07:27 +01:00
Dmitry Olshansky
14e2b21e05
Revert "Merge pull request #3466 from karronoli/fix-curl-options-arg"
...
This reverts commit ea870fe080
, reversing
changes made to 70028953a9
.
2015-08-03 20:04:30 +03:00
karronoli
7877708089
Fix issue 14762
...
without clearing options in perform, curl use previous options.
- Prefer CUSTOM request by libcurl
https://github.com/bagder/curl/blob/master/lib/http.c#L1834
- Change to PUT after PUT by libcurl
https://github.com/bagder/curl/blob/master/lib/http.c#L1830
2015-07-16 01:26:32 +09:00
Dmitry Olshansky
ea870fe080
Merge pull request #3466 from karronoli/fix-curl-options-arg
...
Issue 14763 - Use optionsData argument for options function.
2015-07-14 04:29:48 +03:00
karronoli
7cbf6c6bff
Fix issue 14760
2015-07-14 02:27:35 +09:00
karronoli
6c729e9802
Fix issue 14763 - Use optionsData argument for options function.
2015-07-04 13:08:10 +09:00
Vladimir Panteleev
53e4c65968
fix Issue 14712 - GIT HEAD : std.net.curl regressions
2015-06-23 17:03:01 +00:00
Dicebot
ff14539e17
Add missing std.stdio import to std.net.curl
...
Not tested `static if` branch used `File` symbol without
having proper import
2015-06-16 00:08:10 +03:00
Robert burner Schadek
7a282178d9
curl: struct curly brace semicolon remove
2015-05-28 18:54:00 +02:00
Robert burner Schadek
787637debd
deprecate std.stream and friends
2015-05-28 06:48:28 +02:00
Andrei Alexandrescu
9b9af3196a
Revert "Prefer std.typecons.Flag over booleans for some Phobos arguments"
2015-05-16 18:26:55 -07:00
Martin Nowak
9db66454a9
Merge pull request #3281 from mrkline/more-flags
...
Prefer std.typecons.Flag over booleans for some Phobos arguments
2015-05-17 02:40:23 +02:00
Matt Kline
d04ebe0baa
Add comments and fixup capitalization of flags
2015-05-16 15:47:25 -07:00
Martin Nowak
9837730c5f
Merge pull request #3277 from MartinNowak/refCountedEscaping
...
enable ref escape checking for struct RefCounted
2015-05-16 02:01:12 +02:00
Matt Kline
6a03262f0c
Use Flags for std.curl.Curl.pause
2015-05-14 00:43:06 -07:00
Martin Nowak
9a473ab891
enable ref escape checking for struct RefCounted
2015-05-13 01:15:14 +02:00
Walter Bright
d9a9826e55
Revert "Introducing std.meta package"
2015-05-06 14:36:45 -07:00
Dicebot
82f54a38d3
TypeTuple -> MetaList inside Phobos
2015-05-05 22:22:11 +03:00
Dicebot
73f773838d
import std.typetuple -> import std.meta
2015-05-05 22:22:10 +03:00
Vladimir Panteleev
81b4dcd175
fix Issue 14535 - std.net.curl.CurlException should include status line
2015-05-05 09:30:30 +00:00