-
Hello I'm trying to run the following:
hurl 4.3.0 (x86_64-pc-linux-gnu) libcurl/8.8.0 OpenSSL/3.3.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libssh2/1.11.0 nghttp2/1.61.0
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @magick93 The 400 error code First of all, you can run your script with You have also Another possibility, instead of this syntax:
You can try this syntax (JSON body instead of multiline string body):
The second syntax is equivalent but we're more strict in the request body JSON parsing. If you still have the problem, instead of an
These are equivalent way of doing basic auth but there could still be a bug in Hurl... Hope it's helping you! |
Beta Was this translation helpful? Give feedback.
Hi @magick93
The 400 error code
Bad request
indicates that there could be an error with the requests headers, or body.First of all, you can run your script with
--verbose
. This way, you can check that the requests headers are those expected. You can see also thecurl
command line in Hurl debug logs. You can try thiscurl
command line to check that you've the same error (in case of a potential bug in Hurl).You have also
--very-verbose
option that give you more details (mainly libcurl logs).Another possibility, instead of this syntax: