Thank you!
For other sites, the first solution somehow worked (I did it
following the example from the documentation).
On Wednesday, 3 February 2021 at 19:25:18 UTC, Vindex wrote:
Output:
```
std.net.curl.HTTPStatusException@/usr/include/dmd/phobos/std/net/curl.d(1097):
HTTP request returned status code 405 ()
```
Perhaps some special HTTP configuration is needed?
Is this closer to what you want?
import
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, HTTP, CurlOption;
> import
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
On Friday, 9 October 2020 at 17:50:16 UTC, Andre Pany wrote:
On Friday, 9 October 2020 at 05:56:05 UTC, Vino wrote:
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
On Friday, 9 October 2020 at 05:56:05 UTC, Vino wrote:
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,
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
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,
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
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
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
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 ?
Thanks Stefan! It was compiled with -g, but I was missing the
libcurl3-dbg package. Here's the results:
#0 0x0046b048 in
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
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.
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`
On Sunday, 28 December 2014 at 07:52:24 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 28 Dec 2014 07:44:33 +
Jack via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
How does one compile for Windows on a Linux Machine using dub?
I've been using the platform : [windows]
On Sun, 28 Dec 2014 06:14:09 +
Jack via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
I'm trying to create a sort of downloader where it will
download multiple pages of comics which are in .jpg format.
Now the problem is, that when I used the download() function:
On Sunday, 28 December 2014 at 06:26:18 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 28 Dec 2014 06:14:09 +
Jack via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I'm trying to create a sort of downloader where it will
download multiple pages of comics which are in
On Sun, 28 Dec 2014 06:51:14 +
Jack via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
As much as my brotherhood senses push me into revealing the
links(they're in json), doing that will reveal my guilty
pleasures and fetishes. Well, anywho, thanks for that. I
appreciate
On Sunday, 28 December 2014 at 06:59:02 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 28 Dec 2014 06:51:14 +
Jack via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
As much as my brotherhood senses push me into revealing the
links(they're in json), doing that will
On Sun, 28 Dec 2014 07:24:53 +
Jack via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
Well it's not really that much of a link really. I swear.
It's just like fapping to drawings or some sort of thing.
Not really THAT good of a comic. *sweats*
so that's not one of that
On Sunday, 28 December 2014 at 07:33:23 UTC, ketmar via
Digitalmars-d-learn wrote:
On Sun, 28 Dec 2014 07:24:53 +
Jack via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Well it's not really that much of a link really. I swear.
It's just like fapping to drawings or some
On Sun, 28 Dec 2014 07:44:33 +
Jack via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
How does one compile for Windows on a Linux Machine using dub?
I've been using the platform : [windows] configuration in my
dub.json to no avail since my Windows installation keeps on
On Friday, 20 December 2013 at 18:23:30 UTC, Benji wrote:
When I call get() function from std.net.curl,
I notice it's extremely slow!
Maybe 50 times slower than in Python..
Is there any better/faster alternative?
Without doing any profiling I'd say this character concatenation
while decoding
On Friday, 20 December 2013 at 18:23:30 UTC, Benji wrote:
When I call get() function from std.net.curl,
I notice it's extremely slow!
Maybe 50 times slower than in Python..
Is there any better/faster alternative?
How do you benchmark the functions?
David
Is there an easier way? How to learn about it? A detailed instruction
(at least as detailed as the steps above) at the top of the manual page
(http://dlang.org/phobos/std_net_curl.html) would have been nice...
After all, it's a third party library not fully supplied with the compiler.
Thew
On Friday, 9 August 2013 at 10:26:05 UTC, David wrote:
Is there an easier way? How to learn about it? A detailed
instruction
(at least as detailed as the steps above) at the top of the
manual page
(http://dlang.org/phobos/std_net_curl.html) would have been
nice...
After all, it's a third
Fri, 26 Apr 2013 19:25:16 +0200: mab wrote
Why i get the following Error, when i try to compile a simple Hello
World that imports std.net.curl=
The Error:
# dmd hello.d /usr/lib/x86_64-linux-gnu/libphobos2.a(curl.o): In
function `_D3std3net4curl4Curl19_sharedStaticCtor28FZv':
On Fri, 26 Apr 2013 19:25:16 +0200, mab wrote:
undefined reference to `curl_global_init'
undefined reference to `curl_global_cleanup'
These functions are defined in libcurl. Make sure you have installed
libcurl if it wasn't installed as a dependency for curl.
Thank you for answering. But it didnt work.
I get:
#dmd hello.d -L-lcurl
/usr/bin/ld: cannot find -lcurl
collect2: ld returned 1 exit status
--- errorlevel 1
Curl is installed, as also libcurl3.
I forget to mention that i am using DMD64 D Compiler v2.062.
Is std.net.curl working in this
On 26/04/13 19:55, mab wrote:
Thank you for answering. But it didnt work.
I get:
#dmd hello.d -L-lcurl
/usr/bin/ld: cannot find -lcurl
collect2: ld returned 1 exit status
--- errorlevel 1
Curl is installed, as also libcurl3.
You need to install the development curl package:
$ sudo
On 04/26/2013 10:55 AM, mab wrote:
Thank you for answering. But it didnt work.
I get:
#dmd hello.d -L-lcurl
/usr/bin/ld: cannot find -lcurl
Try providing the directory that the curl library file is in:
#dmd hello.d -L-L/wherever/libcurl/is/in -L-lcurl
Ali
On Friday, 26 April 2013 at 17:55:59 UTC, mab wrote:
Thank you for answering. But it didnt work.
I get:
#dmd hello.d -L-lcurl
/usr/bin/ld: cannot find -lcurl
collect2: ld returned 1 exit status
--- errorlevel 1
Curl is installed, as also libcurl3.
I forget to mention that i am using DMD64 D
On Friday, 26 April 2013 at 18:14:04 UTC, Jordi Sayol wrote:
[...]
You need to install the development curl package:
$ sudo apt-get install libcurl4-openssl-dev
or
$ sudo apt-get install libcurl4-gnutls-dev
or
$ sudo apt-get install libcurl4-nss-dev
[...]
That´s it.
Thank you!
Am Mon, 17 Sep 2012 22:35:39 +0200
schrieb Jonathan M Davis jmdavisp...@gmx.com:
On Monday, September 17, 2012 20:59:05 Johannes Pfau wrote:
addRequestHeader is quite dumb. It simply appends the header to a
list. So by just calling it again you would actually send 2
Content-Type headers.
On 18-Sep-12 11:41, Johannes Pfau wrote:
Am Mon, 17 Sep 2012 22:35:39 +0200
schrieb Jonathan M Davis jmdavisp...@gmx.com:
On Monday, September 17, 2012 20:59:05 Johannes Pfau wrote:
addRequestHeader is quite dumb. It simply appends the header to a
list. So by just calling it again you would
Am Mon, 17 Sep 2012 22:33:28 +0400
schrieb Dmitry Olshansky dmitry.o...@gmail.com:
Recently was playing around with std.net.curl high-level API.
One thing that is a blocker for me is (quoting the docs):
@property void postData(const(char)[] data);
Specifying data to post when not using
On Monday, September 17, 2012 20:59:05 Johannes Pfau wrote:
addRequestHeader is quite dumb. It simply appends the header to a list.
So by just calling it again you would actually send 2 Content-Type
headers.
So, you're suggesting to send 2 content headers? That can't be good. It might
work,
On 08.06.2012 5:03, Sam Hu wrote:
On Thursday, 7 June 2012 at 10:43:32 UTC, Dmitry Olshansky wrote:
string content = get(dlang.org);
It's simple this line you convert whatever site content was to
unicode. Problem is that convert is either broken or it's simply a
cast whereas it should
On 07/06/12 02:57, Sam Hu wrote:
string content = get(dlang.org);
writefln(%s\n,content);
So my very simple question is how to retrieve information from a
webpage which could possibily contains asia font (like Chinese font)?
I'm not really sure but try:
wstring content = get(dlang.org);
On 07.06.2012 10:57, Sam Hu wrote:
Greeting!
The document on this website provide an example on how to get webpage
information by std.net.curl.It is quite straightforward:
[code]
import std.net.curl, std.stdio;
void main(){
// Return a string containing the content specified by an URL
string
On Thursday, 7 June 2012 at 10:43:32 UTC, Dmitry Olshansky wrote:
string content = get(dlang.org);
It's simple this line you convert whatever site content was
to unicode. Problem is that convert is either broken or it's
simply a cast whereas it should re-encode source as unicode. So
the way
On Thursday, 7 June 2012 at 10:38:53 UTC, Kevin wrote:
On 07/06/12 02:57, Sam Hu wrote:
string content = get(dlang.org);
writefln(%s\n,content);
So my very simple question is how to retrieve information from
a
webpage which could possibily contains asia font (like Chinese
font)?
I'm not
On Friday, 24 February 2012 at 07:59:50 UTC, Brad Anderson wrote:
There is no documentation (both on dlang.org and in the local
documentation) so I'm not sure if it's supposed to be working
yet. I get linker errors when I try to use it:
$ dmd netcurl.d
OPTLINK (R) for Win32 Release
On Friday, 24 February 2012 at 08:47:14 UTC, Brad Anderson wrote:
On Friday, 24 February 2012 at 07:59:50 UTC, Brad Anderson
wrote:
There is no documentation (both on dlang.org and in the local
documentation) so I'm not sure if it's supposed to be working
yet. I get linker errors when I try
57 matches
Mail list logo