Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java HTTP AUTH?

I'm trying to connect a desktop application I am writing with the del.icio.us api @ Delicious API and simply provide them with my username and password and to request an url to post a bookmark to my profile.

The problem I have is that I don't understand how to send my login credentials when I open a connection.

How would I go about doing this?

like image 696
AFK Avatar asked Mar 26 '26 00:03

AFK


1 Answers

From the site you referenced:

All /v1 api's require https requests and HTTP-Auth.

HTTP-Auth is header used in basic authentication.
In Java, you can simply put your credentials in the URL:

http://user:[email protected]/

You can verify that it was set correctly using the URL.getUserInfo() method.

like image 135
jheddings Avatar answered Mar 28 '26 13:03

jheddings



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!