lihaoyi / test

0 stars 0 forks source link

HTTP basic authentication in the URL is not available #646

Open lihaoyi opened 1 month ago

lihaoyi commented 1 month ago

I am a novice in network protocol. In other programming languages (such as Python or Julia), I can send a request with authentication using code similar to the following

requests.get('http://elastic:elastic@localhost:9200')  # Python
> <Response [200]>
HTTP.get('http://elastic:elastic@localhost:9200')  # Julia
>  <Response [200]>

But when I use request-scala, I get a 401 response

requests.get("http://elastic:elastic@localhost:9200")  //Scala
> <Response [401]>

I've tried other Scala HTTP libraries, such as scalaj-http, and the same problem. I want to know http://user:password@address:port is a common way to write? Why doesn't our library support it? ID: 93 Original Author: lotcher