On Saturday, 20 May 2023 at 09:20:54 UTC, kdevel wrote:
What if the internet connection is not re-established within an
reasonable amount of time? What if the resource is no longer
available on the server (HTTP eror 404 [1])? If there is an
interactive user: Wouldn't it be better have the
On Friday, 19 May 2023 at 23:36:28 UTC, anonymouse wrote:
[...]
The reason I used a while loop was to detect loss of internet
connection and resume the process once the connection is
re-established.
What if the internet connection is not re-established within an
reasonable amount of time?
On Friday, 19 May 2023 at 12:40:29 UTC, Danny Arends wrote:
On Friday, 19 May 2023 at 11:07:01 UTC, anonymouse wrote:
What am I doing wrong here?
[SNIP]
You're running the whole thing in a while(TRUE) loop,
recreating the curl object re-initiating the transfer and file
pointer, etc.
The
On Friday, 19 May 2023 at 12:28:20 UTC, kdevel wrote:
On Friday, 19 May 2023 at 11:07:01 UTC, anonymouse wrote:
What am I doing wrong here?
[...]
curl.set(CurlOption.writedata, );
According to [1] this line must read
```
curl.set(CurlOption.writedata, cast (void *)
On Friday, 19 May 2023 at 12:28:20 UTC, kdevel wrote:
On Friday, 19 May 2023 at 11:07:01 UTC, anonymouse wrote:
What am I doing wrong here?
[...]
curl.set(CurlOption.writedata, );
According to [1] this line must read
```
curl.set(CurlOption.writedata, cast (void *)
On Friday, 19 May 2023 at 11:07:01 UTC, anonymouse wrote:
What am I doing wrong here?
```D
import std.net.curl: Curl, CurlOption, CurlException;
import std.file: exists;
import std.stdio: File, writefln;
import core.thread: Thread;
void downloadFile(string url, string filename)
{
while
On Friday, 19 May 2023 at 11:07:01 UTC, anonymouse wrote:
What am I doing wrong here?
[...]
curl.set(CurlOption.writedata, );
According to [1] this line must read
```
curl.set(CurlOption.writedata, cast (void *) fp.getFP());
```
[1]
What am I doing wrong here?
```D
import std.net.curl: Curl, CurlOption, CurlException;
import std.file: exists;
import std.stdio: File, writefln;
import core.thread: Thread;
void downloadFile(string url, string filename)
{
while (true) {
try {
File fp
What am I doing wrong here?
```D
import std.net.curl: Curl, CurlOption, CurlException;
import std.file: exists;
import std.stdio: File, writefln;
import core.thread: Thread;
void downloadFile(string url, string filename)
{
while (true) {
try {
File fp
The [std.net.curl](https://dlang.org/phobos/std_net_curl.html)
module provides these functions:
```d
T[] post(T = char, PostUnit)(const(char)[] url, const(PostUnit)[]
postData, HTTP conn = HTTP())
T[] post(T = char)(const(char)[] url, string[string] postDict,
HTTP conn = HTTP())
```
How can
On Monday, 26 July 2021 at 19:53:05 UTC, frame wrote:
All better the lib could do is to print the text for the status
too and the raw payload sent by the server aka error
description, if any.
That's what I'm proposing. Currently std.net.curl's post function
doesn't report all the
On Monday, 26 July 2021 at 14:13:53 UTC, bachmeier wrote:
In doubt you can turn on the verbose() method on the HTTP
object.
That's a modest improvement (for the small number of people
that find the option in the docs) but definitely not at the
same level of information as the curl CLI. I
On Sunday, 25 July 2021 at 15:44:14 UTC, frame wrote:
On Sunday, 25 July 2021 at 13:07:36 UTC, bachmeier wrote:
On Friday, 23 July 2021 at 18:11:51 UTC, bachmeier wrote:
[...]
After all this, it turned out the answer was a simple (but not
obvious) typo in the header information. It would be
On Sunday, 25 July 2021 at 13:07:36 UTC, bachmeier wrote:
On Friday, 23 July 2021 at 18:11:51 UTC, bachmeier wrote:
[...]
After all this, it turned out the answer was a simple (but not
obvious) typo in the header information. It would be nice to
get more information than "HTTP request
On Friday, 23 July 2021 at 18:11:51 UTC, bachmeier wrote:
[...]
After all this, it turned out the answer was a simple (but not
obvious) typo in the header information. It would be nice to get
more information than "HTTP request returned status code 400 ()".
I don't know if that's possible,
()
method for example.
I understand, and indeed, that's what's done by the working curl
command I posted. I don't know how to translate that into a post
request using std.net.curl. The natural thing would be to pass as
the second argument the same string I'm sending as the `--data`
option to curl
On Friday, 23 July 2021 at 21:25:01 UTC, bachmeier wrote:
Authorization is working - it's the same whether I'm doing a
GET or POST request. The problem is passing the data. The main
problem is that the documentation doesn't explain how to
translate a `--data` option into a `post` call. I've
On Friday, 23 July 2021 at 19:59:33 UTC, Ali Çehreli wrote:
On 7/23/21 11:11 AM, bachmeier wrote:
I'm writing a D program that interacts with the Todoist API
using std.net.curl. It's not a problem to do get requests to
query tasks, but I cannot find a way to get post to work to
create a new
On 7/23/21 11:11 AM, bachmeier wrote:
I'm writing a D program that interacts with the Todoist API using
std.net.curl. It's not a problem to do get requests to query tasks, but
I cannot find a way to get post to work to create a new task.
This is a working bash script, where APIKEY is defined
I'm writing a D program that interacts with the Todoist API using
std.net.curl. It's not a problem to do get requests to query
tasks, but I cannot find a way to get post to work to create a
new task.
This is a working bash script, where APIKEY is defined elsewhere
and $1 and $2 are user
On Wednesday, 17 March 2021 at 16:02:58 UTC, tastyminerals wrote:
I am using std.net.curl and the following chunk of code in many
places:
"""
http.setPostData(userData, "application/json");
http.addRequestHeader("Accept", "application/json&quo
I am using std.net.curl and the following chunk of code in many
places:
"""
http.setPostData(userData, "application/json");
http.addRequestHeader("Accept", "application/json");
http.addRequestHeader("Authorization&quo
Thank you!
For other sites, the first solution somehow worked (I did it
following the example from the documentation).
std.stdio, std.net.curl;
void main() {
enum url = "https://en.wikipedia.org/wiki/Passenger_pigeon;;
auto http = HTTP(url);
http.perform();
writeln(http.responseHeaders);
}
Header requests to Wikipedia give 405 error for some reason.
```
import std.stdio, std.net.curl;
void main() {
auto url = "https://en.wikipedia.org/wiki/Passenger_pigeon;;
auto http = HTTP();
options(url, http);
writeln(http.responseHeaders);
}
```
O
On Monday, 9 November 2020 at 20:57:33 UTC, Daniel Kozak wrote:
On Mon, Nov 9, 2020 at 9:50 PM rinfz via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
On Monday, 9 November 2020 at 20:40:59 UTC, rinfz wrote:
> On Monday, 9 November 2020 at 19:55:07 UTC, Vino wrote:
>> ...
>
On Mon, Nov 9, 2020 at 9:50 PM rinfz via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Monday, 9 November 2020 at 20:40:59 UTC, rinfz wrote:
> > On Monday, 9 November 2020 at 19:55:07 UTC, Vino wrote:
> >> ...
> >
> > The only curl option you need to set within the loop is
On Monday, 9 November 2020 at 20:40:59 UTC, rinfz wrote:
On Monday, 9 November 2020 at 19:55:07 UTC, Vino wrote:
...
The only curl option you need to set within the loop is the
CurlOption.url. So your foreach block should look more like:
foreach (...) {
string url = chain(apihost,
On Monday, 9 November 2020 at 19:55:07 UTC, Vino wrote:
...
The only curl option you need to set within the loop is the
CurlOption.url. So your foreach block should look more like:
foreach (...) {
string url = chain(apihost, only(':'), to!string(apiport),
apiuri).to!string;
Just delete it
On Mon, Nov 9, 2020 at 9:00 PM Vino via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> Hi All,
>
>Request your help to on how to improve the performance of the
> below code.
>
> import std.conv: to;
> import std.net.curl : get,
Hi All,
Request your help to on how to improve the performance of the
below code.
import std.conv: to;
import std.net.curl : get, HTTP, CurlOption;
import std.parallelism: parallel;
import std.range: chain, only;
import std.typecons: Tuple, tuple;
void main ()
{
Array!(Tuple!(int,string
On Sunday, 11 October 2020 at 08:48:16 UTC, Vino wrote:
On Friday, 9 October 2020 at 17:50:16 UTC, Andre Pany wrote:
[...]
Hi Andre,
Thank you very much, now we are able to get the data as
expected using jv["Name"], now when we try to print all the
returned data with Key and Values as
from my mobile, a lot of room for improvements):
import std.net.curl, std.stdio;
// GET with custom data receivers
auto http = HTTP("dlang.org");
http.onReceiveHeader =
(in char[] key, in char[] value) { writeln(key, ": ",
value); };
ubyte[] content;
http.onReceive = (ub
sJSONTokenInputRange!Input
` ``
datacoll.d(19):All possible candidates are marked as
`deprecated` or `@disable`
Tip: not satisfied constraints are marked with `>`
From,
Vino
(Writing from my mobile, a lot of room for improvements):
import std.net.curl, s
On Friday, 9 October 2020 at 05:30:34 UTC, ikod wrote:
On Friday, 9 October 2020 at 01:45:37 UTC, Vino wrote:
On Friday, 2 October 2020 at 23:20:48 UTC, Imperatorn wrote:
On Friday, 2 October 2020 at 21:12:09 UTC, Vino wrote:
Hi All,
...
auto content = https.perform();
https.shutdown;
On Friday, 9 October 2020 at 01:45:37 UTC, Vino wrote:
On Friday, 2 October 2020 at 23:20:48 UTC, Imperatorn wrote:
On Friday, 2 October 2020 at 21:12:09 UTC, Vino wrote:
Hi All,
...
auto content = https.perform();
https.shutdown;
JSONValue jv = parseJSONValue(content);
Maybe
JSONValue jv
~`
datacoll.d(20):All possible candidates are marked as
`deprecated` or `@disable`
Tip: not satisfied constraints are marked with `>`
Code:
import std.net.curl, std.conv, std.stdio, stdx.data.json;
void main() {
auto https = HTTP();
https.handle.set(CurlOption.u
On Friday, 2 October 2020 at 21:12:09 UTC, Vino wrote:
Hi All,
Request your help, the below code is working but we need the
output as a json array, in PHP we have json_encode(content), so
how to do the same in D, the output is as below, as we need to
store this output into database table
On Friday, 2 October 2020 at 21:12:09 UTC, Vino wrote:
Hi All,
Request your help, the below code is working but we need the
output as a json array, in PHP we have json_encode(content), so
how to do the same in D, the output is as below, as we need to
store this output into database table
]
},
{"id":"2",
"hostname":"server2",
"pool":"dev",
"options":[
{"optionValue":"te...@mail.com,test2"},
{&qu
Nice, I have been having this problem for quite a while too.
Thanks
On Thursday, 3 September 2020 at 11:14:14 UTC, tastyminerals
wrote:
I have a specific curl query that I want to use in a D script
via std.net.curl.
Here is the query:
curl -v -X POST
--data-urlencode "username=u...@gmail.net"
--data-urlencode "password=12
I have a specific curl query that I want to use in a D script via
std.net.curl.
Here is the query:
curl -v -X POST
--data-urlencode "username=u...@gmail.net"
--data-urlencode "password=12345"
-H "Content-Type: application/x-www-form-urlen
On Thursday, 18 June 2020 at 01:15:00 UTC, dangbinghoo wrote:
Don't worry, almost ALL GUI FRAMEWORK in the world IS NOT
THREAD SAFE, the wellknow Qt and Gtk, and even morden Android
and the java Swing.
binghoo dang
You can certainly download in another thread in Qt. However, you
On Thursday, 11 June 2020 at 06:13:59 UTC, adnan338 wrote:
On Thursday, 11 June 2020 at 06:05:09 UTC, adnan338 wrote:
I would like to set a callback for the `download()` function
but I do not seem to find a way to add a callback to the
procedure.
[...]
I have also been told that Gtk is not
On Thursday, 11 June 2020 at 06:13:59 UTC, adnan338 wrote:
On Thursday, 11 June 2020 at 06:05:09 UTC, adnan338 wrote:
I would like to set a callback for the `download()` function
but I do not seem to find a way to add a callback to the
procedure.
[...]
I have also been told that Gtk is not
On Thursday, 11 June 2020 at 06:05:09 UTC, adnan338 wrote:
I would like to set a callback for the `download()` function
but I do not seem to find a way to add a callback to the
procedure.
Let's say, for example I have a GtkD Widget called "pb" (short
for progressBar).
I want to download a
On Thursday, 11 June 2020 at 06:05:09 UTC, adnan338 wrote:
I would like to set a callback for the `download()` function
but I do not seem to find a way to add a callback to the
procedure.
[...]
I have also been told that Gtk is not thread safe. What does this
mean and does it effect me on
I would like to set a callback for the `download()` function but
I do not seem to find a way to add a callback to the procedure.
Let's say, for example I have a GtkD Widget called "pb" (short
for progressBar).
I want to download a file from a url and when done, I want a
callback to access
On Sunday, 26 April 2020 at 22:03:33 UTC, data pulverizer wrote:
Hi all,
I am using std.net.curl and would like to run a HEAD request to
find out if a web page exists - I've looked at the
documentation and have tried various things that haven't worked.
Thanks
Never mind, I've got
Hi all,
I am using std.net.curl and would like to run a HEAD request to
find out if a web page exists - I've looked at the documentation
and have tried various things that haven't worked.
Thanks
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
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 =
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", "http://loca
not sure if this is a bug or is by design.
You could use download() in a parallel foreach, something like
this:
import std.stdio;
import std.parallelism;
import std.net.curl;
import std.typecons;
void main()
{
auto connections = 3; // 3 parallel downloads
defaultPoolThreads(connections - 1
, you could always give requests a shot:
https://code.dlang.org/packages/requests
It's the unofficial successor of std.net.curl.
On Monday, 25 March 2019 at 16:44:12 UTC, Andre Pany wrote:
First idea, please switch to x86_64 if possible. This will also
be the default of Dub in the next dmd release or the release
after.
Kind regards
Andrew
Figured out --arch=x86_64, thanks! Sadly I don't see any change.
I'm not
On Monday, 25 March 2019 at 16:25:37 UTC, cptgrok wrote:
I need to review syslogs for over 160 systems monthly, and I am
trying to write a utility to automate bulk downloads from a
custom web service where they are hosted. I need to calculate a
date range for the prior month, add start and end
system, which is easy,
and in a foreach(system; systems) loop in main() I call a
function passing the string url in to download and write a log to
file. For a small number of systems, it works.
My trouble is, using std.net.curl, if I use get(URL) to get the
entire text in a single call and write
I want to abort a download, if a condition inside of
onReceiveHeader is true.
The following code do the job, but it feels very wrong - is there
a better/proper way to do such a thing?
client.onReceiveHeader = (in char[] key, in char[] value) {
if(key == "content-type") {
if( -1 ==
try to compile this program from std.net.curl
import std.net.curl, std.stdio;
void main()
{
auto range1 = byLineAsync("www.google.com");
auto range2 = byLineAsync("www.wikipedia.org");
foreach (line; byLineAsync("dlang.org"))
writeln(lin
to be a problem with certificates. Can I get the
html code of the https site using std.net.curl?
Thank you.
On Saturday, 24 September 2016 at 19:42:11 UTC, Joseph Rushton
Wakeling wrote:
On Saturday, 24 September 2016 at 19:27:31 UTC, Joseph Rushton
Wakeling wrote:
Further to earlier remarks: I now think this may be a general
problem of LDC 1.0.0 and not a problem of the snap package.
I tried
On Saturday, 24 September 2016 at 19:27:31 UTC, Joseph Rushton
Wakeling wrote:
Further to earlier remarks: I now think this may be a general
problem of LDC 1.0.0 and not a problem of the snap package.
I tried building my simple curl-using program using an LDC
1.0.0 build and installed from
On Saturday, 24 September 2016 at 19:11:52 UTC, Joseph Rushton
Wakeling wrote:
On Friday, 23 September 2016 at 00:55:43 UTC, Stefan Koch wrote:
This suggests that libcurl is loaded.
could you compile with -g ?
and then post the output ?
Further to earlier remarks: I now think this may be a
44f971 in
std.net.curl.HTTP.perform(std.typecons.Flag!("throwOnError").Flag) ()
#20 0x0040db01 in
std.net.curl._basicHTTP!(char)._basicHTTP(const(char)[],
const(void)[], std.net.curl.HTTP) ()
#21 0x004031ff in std.net.curl.get!(std.net.curl.HTTP,
char).get(const(char)[
On Thursday, 22 September 2016 at 23:19:27 UTC, Joseph Rushton
Wakeling wrote:
The segfault would suggest to me that either the loading of the
library fails or that there's some resource phobos expects to
find which it can't access. Can anyone advise what could be
going on here?
-- Joe
Hello all,
As some have you may have followed, I've been working on
snap-packaging LDC. However, I've run into an issue when it
comes to programs that use std.net.curl.
Here's a simple example:
void main ()
{
import std.net.curl : get;
auto website = "
On Tuesday, 16 August 2016 at 10:06:05 UTC, ikod wrote:
On Tuesday, 16 August 2016 at 09:16:40 UTC, yawniek wrote:
There is common http message parser that used in nginx and
nodejs. I think it can be ported from C to D.
that is pico, see:
https://github.com/nodejs/http-parser/pull/200
On Tuesday, 16 August 2016 at 09:16:40 UTC, yawniek wrote:
imo things should be modularized.
so there should be (fast) protocol parsers first, something like
https://github.com/h2o/picohttpparser or
https://github.com/seanmonstar/httparse
then a very simple eventloop that has abstractions and
imo things should be modularized.
so there should be (fast) protocol parsers first, something like
https://github.com/h2o/picohttpparser or
https://github.com/seanmonstar/httparse
then a very simple eventloop that has abstractions and range
based interfaces for reading/writing data into
On 16/08/2016 3:35 AM, Seb wrote:
On Monday, 15 August 2016 at 15:25:22 UTC, rikki cattermole wrote:
On 16/08/2016 3:20 AM, Seb wrote:
On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote:
On 16/08/2016 3:01 AM, Oleg B wrote:
As replacement of std.net.curl I found
https
On Monday, 15 August 2016 at 15:01:13 UTC, Oleg B wrote:
Hello.
As replacement of std.net.curl I found
https://github.com/ikod/dlang-requests. Who know's about this
lib? Is this good replacement of std.net.curl?
Maybe if I need json and http requests I must fully use vibe
for these things
On Monday, 15 August 2016 at 15:01:13 UTC, Oleg B wrote:
Hello.
In std.xml docs I read that is deprecated, [...]
For XML I found this project
https://github.com/lodo1995/experimental.xml. Is this really
candidate to std, or author just called it as he want?
Hi!
I'm the developer of that XML
On Monday, 15 August 2016 at 15:25:22 UTC, rikki cattermole wrote:
On 16/08/2016 3:20 AM, Seb wrote:
On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole
wrote:
On 16/08/2016 3:01 AM, Oleg B wrote:
As replacement of std.net.curl I found
https://github.com/ikod/dlang-requests. Who
On 16/08/2016 3:20 AM, Seb wrote:
On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote:
On 16/08/2016 3:01 AM, Oleg B wrote:
As replacement of std.net.curl I found
https://github.com/ikod/dlang-requests. Who know's about this lib? Is
this good replacement of std.net.curl?
Nope
On Monday, 15 August 2016 at 15:04:29 UTC, rikki cattermole wrote:
On 16/08/2016 3:01 AM, Oleg B wrote:
As replacement of std.net.curl I found
https://github.com/ikod/dlang-requests. Who know's about this
lib? Is
this good replacement of std.net.curl?
Nope, not a replacement.
Why? I like
Hello.
In std.xml docs I read that is deprecated, and std.net.curl can
be deprecated too (not remember here I read about std.net.curl).
About std.json I read what it's has slow (de)serialization.
What I must use at this time?
vibe.data.json has evolution
https://github.com/s-ludwig
On 16/08/2016 3:01 AM, Oleg B wrote:
Hello.
In std.xml docs I read that is deprecated, and std.net.curl can be
deprecated too (not remember here I read about std.net.curl). About
std.json I read what it's has slow (de)serialization.
What I must use at this time?
vibe.data.json has evolution
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 ...
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
, 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
http://dpldocs.info/experimental-docs/std.net.curl.HTTP.setPostData.html
https://dlang.org/phobos/std_net_curl.html#.HTTP.setPostData
reading documentation rox!
(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
: ASPSESSIONIDSSCCDASA=KIAPMCMDMPEDHPBJNMGFHMEB; path=/
x-powered-by: ASP.NET
Looks like std.net.curl doesn't handle "Charset" correctly. It only
works with lowercase "charset".
https://github.com/dlang/phobos/pull/4723
On Monday, 8 August 2016 at 21:11:26 UTC, ag0aep6g wrote:
On 08/08/2016 09:57 PM, Alexsej wrote:
// content in ISO-8859-1 to UTF-8 encoding but I lose
//the Cyrillic "отсутствует или неверно задан параметр"
// I get it "оÑÑÑÑÑÑвÑÐµÑ Ð¸Ð»Ð¸ невеÑно
задан
On 08/08/2016 11:11 PM, ag0aep6g wrote:
Why on earth does transcode only accept immutable characters for input?
https://github.com/dlang/phobos/pull/4722
On Monday, 8 August 2016 at 21:11:26 UTC, ag0aep6g wrote:
On 08/08/2016 09:57 PM, Alexsej wrote:
// content in ISO-8859-1 to UTF-8 encoding but I lose
//the Cyrillic "отсутствует или неверно задан параметр"
// I get it "оÑÑÑÑÑÑвÑÐµÑ Ð¸Ð»Ð¸ невеÑно
задан
On 08/08/2016 09:57 PM, Alexsej wrote:
// content in ISO-8859-1 to UTF-8 encoding but I lose
//the Cyrillic "отсутствует или неверно задан параметр"
// I get it "оÑÑÑÑÑÑвÑÐµÑ Ð¸Ð»Ð¸ невеÑно
задан паÑамеÑÑ"
// How do I change the encoding to UTF-8
import std.stdio;
import std.net.curl;
void main()
{
string url = "www.site.ru/xml/api.asp";
string data =
"
59538
...
";
Here is my original SO question:
http://stackoverflow.com/questions/34218692/how-do-i-properly-set-socket-options-on-std-net-curl
any ideas?
thx!
On Monday, 17 August 2015 at 13:13:48 UTC, anonymous wrote:
and figured out that the linker is invoked (on my machine) with
gcc a.o -o a -m64 -lcurl -L/usr/lib/x86_64-linux-gnu -Xlinker
correct (I named the example programm a.d instead of app.d):
gcc app.o -o app -m64 -lcurl
On Monday, 17 August 2015 at 13:26:29 UTC, Adam D. Ruppe wrote:
On Monday, 17 August 2015 at 13:04:31 UTC, tired_eyes wrote:
Error: unrecognized switch '-lcurl'
ooh I'm sorry, should have been `dmd -L-lcurl yourprogram.d`
Yes, it did the trick.
Hi,
I'm trying to compile this trivial example of std.net.curl:
// app.d
import std.stdio;
import std.net.curl;
void main() {
auto content = get(dlang.org);
}
Hovewer, dmd app.d spits a whole bunch of strange error
messages:
/usr/lib64/libphobos2.a(curl.o): In function
On Monday, 17 August 2015 at 12:58:54 UTC, Adam D. Ruppe wrote:
On Monday, 17 August 2015 at 12:52:37 UTC, tired_eyes wrote:
Hovewer, dmd app.d spits a whole bunch of strange error
messages:
try dmd -lcurl app.d and see if that helps.
Error: unrecognized switch '-lcurl'
On Monday, 17 August 2015 at 12:52:37 UTC, tired_eyes wrote:
Hovewer, dmd app.d spits a whole bunch of strange error
messages:
try dmd -lcurl app.d and see if that helps.
On Monday, 17 August 2015 at 13:04:31 UTC, tired_eyes wrote:
On Monday, 17 August 2015 at 12:58:54 UTC, Adam D. Ruppe wrote:
On Monday, 17 August 2015 at 12:52:37 UTC, tired_eyes wrote:
Hovewer, dmd app.d spits a whole bunch of strange error
messages:
try dmd -lcurl app.d and see if that
On Monday, 17 August 2015 at 12:58:54 UTC, Adam D. Ruppe wrote:
On Monday, 17 August 2015 at 12:52:37 UTC, tired_eyes wrote:
Hovewer, dmd app.d spits a whole bunch of strange error
messages:
try dmd -lcurl app.d and see if that helps.
DMD does not accept -lcurl. From dmd --help:
On Monday, 17 August 2015 at 13:04:31 UTC, tired_eyes wrote:
Error: unrecognized switch '-lcurl'
ooh I'm sorry, should have been `dmd -L-lcurl yourprogram.d`
It seems that PATCH http method is missing from std.net.curl http
methods.
No way to use it?
1 - 100 of 165 matches
Mail list logo