Skip to main content
sorin's user avatar
sorin's user avatar
sorin's user avatar
sorin
  • Member for 15 years
  • Last seen more than a week ago
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
comment
Can I make cURL fail with an exitCode different than 0 if the HTTP status code is not 200?
Sometimes the best answer is not the accepted one or the one with most votes. This one works cross platform as on macos you do not get the newest curl that has the --fail-with-body... same for lots of other platforms. Ugly, but works.
comment
Can I make cURL fail with an exitCode different than 0 if the HTTP status code is not 200?
Sadly, 7.76 did not reach macos, which seem to still use 7.65.1
awarded
awarded
awarded
awarded
awarded
awarded
awarded
awarded
1
2 3 4 5
19