Basic auth with curl does not work

In my development environment I do not have SSL. On the other hand here https://github.com/bestpractical/rt-extension-rest2 I read that I need SSL:

Authentication Methods
Authentication should always be done over HTTPS/SSL for security. You
should only serve up the /REST/2.0/ endpoint over SSL.

So when I do:

curl -u 'username:password' /path/to/REST/2.0

I got:
{"message":"Unauthorized"}

but credentials is definitely right.

Is there any way to workaround this issue?

Is there a reason why don’t have SSL support on your web server in your development environment? On Linux machines for example it is usually just an operating system package to load (using apt-get, yum, dnf, etc as appropriate for your distribution).

Also you can use the -v option to curl to get it to be more verbose which can help with debugging.

It’s “not have SSL” but “not configured SSL”. Does SSL mandatory? Could I make auth query without SSL?

Also here is curl query with -v option.

curl_rt

I use port 80 for my dev enviroment and curl basic auth without issue, so I don’t believe REST requires it.

curl --request POST 'http://MyRT/REST/2.0/ticket' \
--header 'Content-Type: application/json' \
-u 'root:password' \
--data-raw '{"Queue": "General", "Subject": "Some subject"}'

That works fine for me^

Yes, the same route http://MyRT/REST/2.0/ticket works for me too.

Maybe something happens with http://MyRT/REST/2.0 route? Could you please check:

Basic Auth
Authentication may use internal RT usernames and passwords, provided via
HTTP Basic auth. Most HTTP libraries already have a way of providing
basic auth credentials when making requests. Using curl, for example:

    curl -u 'username:password' /path/to/REST/2.0

from this https://github.com/bestpractical/rt-extension-rest2 documentation?

The route you’re hitting isn’t an actual endpoint, right? So it makes sense that nothing happens

Hm. Documentation I mention above, said that it is an endpoint. Simple POST request /path/to/REST/2.0

Addition:

I add sefl-signed certificate, so now I use ssl: https://127.0.0.1/rt/REST/2.0 and still does not work.

I’d assume the documentation is wrong, since what kind of data would you expect back from just /REST/2.0/ as an endpoint?