cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl fails where netscape succeeds

From: John P. Hartmann <jphartmann_at_gmail.com>
Date: Mon, 19 Sep 2011 10:33:34 +0100

Absolute beginner. I must be missing something obvious.

Typing 'http://api.discogs.com/artist/John+Coltrane' into netscape
gets me information on the saxofonist.

Sending the same URL with libcurl does not. The first line is my log
of the parameter to curl_easy_setopt(curl, CURLOPT_URL, qry);:

Query 'http://www.discogs.com/artist/John+Coltrane'
* About to connect() to www.discogs.com port 80 (#0)
* Trying 70.103.226.22... * connected
> GET /artist/John+Coltrane HTTP/1.1
Host: www.discogs.com

500 Client Refused
* Connection #0 to host www.discogs.com left intact
* Closing connection #0

Passing the URL to the curl command gets me a different error response:

u@ubuntu:~$ curl 'http://api.discogs.com/artist/John+Coltrane'
{"resp": {"status": false, "version": "2.0", "error": "Invalid API
request"}}u_at_ubuntu:~$

What gives?

As an aside, any pointers on the care and feed of discogs would be
much appreciated off the list. Or a pointer to any kind of useful
documentation for that matter.

Thanks,

   j.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-19