curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: About libcurl- Help, please

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 13 Nov 2020 08:42:11 +0100 (CET)

On Thu, 12 Nov 2020, Osvaldo Pérez García via curl-library wrote:

> curl -X GET --header 'Accept: application / json' --header 'Authorization:
> Bearer undefined'
> 'https://apistaging.psigate.com/api/secure/ioptransactions?search=41Z256'

Some general advice (in addition to Monty's):

1. '-X GET' is rarely what you want and in this case it should be dropped from
the command line.

2. Accept: headers normally don't have spaces around the slashes. Try "Accept:
application/json"

3. I assume that auth header was edited? Sending "undefined" like that doesn't
seem intended.

4. "I cannot get this command to work well" doesn't explain what you want nor
what happens. Many times the actual HTTP request works fine but the end
results is not what you want, even if curl works exactly the way it is
supposed to. We need specifics!

5. You didn't tell us which libcurl version you're using. Always include that.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://www.wolfssl.com/contact/


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-11-13