3rd party API gives back 500 error, what code should my API return

Well, I think it’s up to you which error code you’ll use. But if the actual functionality of your API depends on a third-party API, I would consider using the HTTP code 503 Service Unavailable, because your service will be unavailable until the third-party API works, no matter what HTTP code the third-party API returned. … Read more

How to define the basic HTTP authentication using cURL correctly?

curl -u username:password http:// curl -u username http:// From the documentation page: -u, –user <user:password> Specify the user name and password to use for server authentication. Overrides -n, –netrc and –netrc-optional. If you simply specify the user name, curl will prompt for a password. The user name and passwords are split up on the first … Read more