Re: Using std.net.curl

2020-02-29 Thread David Anderson via Digitalmars-d-learn
On Saturday, 29 February 2020 at 07:35:10 UTC, Boris Carvajal wrote: On Saturday, 29 February 2020 at 03:53:37 UTC, David Anderson wrote: I want to capture that text in a variable, but the upload function returns void. How can I get the text returned by the web server to be stored in a

Re: Using std.net.curl

2020-02-28 Thread Boris Carvajal via Digitalmars-d-learn
On Saturday, 29 February 2020 at 03:53:37 UTC, David Anderson wrote: I want to capture that text in a variable, but the upload function returns void. How can I get the text returned by the web server to be stored in a variable? import std; auto updata = read("inputfile"); auto dldata =

Using std.net.curl

2020-02-28 Thread David Anderson via Digitalmars-d-learn
I'm working with std.net.curl. Using curl on the command line I can do this: curl -T file.txt http://localhost:9998/tika and it returns text as a result. When I attempt to do the same thing in D code as follows: import std.net.curl; upload("file.txt",

How to access https web page using std.net.curl?

2016-11-20 Thread acbbad via Digitalmars-d-learn
to be a problem with certificates. Can I get the html code of the https site using std.net.curl? Thank you.

Re: Specifying content-type for a POST request using std.net.curl

2016-08-09 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 9 August 2016 at 14:30:21 UTC, Seb wrote: There is also https://github.com/ikod/dlang-requests Which I find in general more intuitive to use ;-) Interesting, I'd not come across that before. Thanks -- I'll give it a glance some time ...

Re: Specifying content-type for a POST request using std.net.curl

2016-08-09 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 9 August 2016 at 14:21:09 UTC, ketmar wrote: http://dpldocs.info/experimental-docs/std.net.curl.HTTP.setPostData.html https://dlang.org/phobos/std_net_curl.html#.HTTP.setPostData reading documentation rox! Yea, mea culpa. I had actually glanced at that but was asking on the

Re: Specifying content-type for a POST request using std.net.curl

2016-08-09 Thread Seb via Digitalmars-d-learn
, because the input data is `void[]` or `ubyte[]` data. Can anyone advise (if it's possible at all) how to specify the content type for the post request body using std.net.curl (or an alternative)? Thanks & best wishes, -- Joe There is also https://github.com/ikod/dlang-requests Whi

Re: Specifying content-type for a POST request using std.net.curl

2016-08-09 Thread ketmar via Digitalmars-d-learn
http://dpldocs.info/experimental-docs/std.net.curl.HTTP.setPostData.html https://dlang.org/phobos/std_net_curl.html#.HTTP.setPostData reading documentation rox!

Specifying content-type for a POST request using std.net.curl

2016-08-09 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
(if it's possible at all) how to specify the content type for the post request body using std.net.curl (or an alternative)? Thanks & best wishes, -- Joe

Using std.net.curl to stream data

2015-01-28 Thread Trollgeir via Digitalmars-d-learn
I'm having some trouble trying to stream data to my plot.ly graph: https://plot.ly/62/~Trollgeir/ The API: https://plot.ly/streaming/ I am able to post messages that get recorded into the stream live, although right after curl uploads it, it just seems to wait for a response it's not

Re: Using std.net.curl to stream data

2015-01-28 Thread Chris Williams via Digitalmars-d-learn
On Wednesday, 28 January 2015 at 14:18:38 UTC, Trollgeir wrote: I'm having some trouble trying to stream data to my plot.ly graph: https://plot.ly/62/~Trollgeir/ The API: https://plot.ly/streaming/ I am able to post messages that get recorded into the stream live, although right after curl

Re: Using std.net.curl

2014-04-08 Thread Volodymyr Kvyt
On Wednesday, 4 July 2012 at 17:19:02 UTC, Brad Anderson wrote: I just ended up specifying the link command manually (see my answer on the Stack Overflow). It's ugly but it works. Leandro discusses a solution here: http://d.puremagic.com/issues/show_bug.cgi?id=7044#c1 It hasn't been

Re: Using std.net.curl

2012-07-07 Thread Gary Willoughby
Yeah invoking the linker manually works fine. To save me from that each time i've actually added '-L-lphobos2' to the end of 'DFLAGS' in '/etc/dmd.conf' so phobos is always before curl in the linker argument list. When the program is compiled '-L-lphobos2' appears twice in the args but that's

Re: Using std.net.curl

2012-07-04 Thread Brad Anderson
On Sun, Jul 1, 2012 at 10:59 AM, Gary Willoughby d...@kalekold.net wrote: I'm using the built-in curl library on Linux i'm getting linker errors. I've installed libcurl4-openssl-dev and it works fine as i can successfully compile a sample program. However when using the D lib i get these

Using std.net.curl

2012-07-01 Thread Gary Willoughby
I'm using the built-in curl library on Linux i'm getting linker errors. I've installed libcurl4-openssl-dev and it works fine as i can successfully compile a sample program. However when using the D lib i get these errors: [quote] :!rdmd api_test.d