Http Auth in a Firefox 3 bookmarklet

Question :

Http Auth in a Firefox 3 bookmarklet,

Answer :

I’m trying to create a bookmarklet for posting del.icio.us bookmarks to a separate account.

I tested it from the command line like:

wget -O - --no-check-certificate   "https://seconduser:thepassword@api.del.icio.us/v1/posts/add?url=http://seet.dk&description=test"  

This works great.

I then wanted to create a bookmarklet in my firefox. I googled and found bits and pieces and ended up with:

javascript:void(      open('https://seconduser:password@api.del.icio.us/v1/posts/add?url='            +encodeURIComponent(location.href)            +'&description='+encodeURIComponent(document.title),            'delicious','toolbar=no,width=500,height=250'          )      );  

But all that happens is that I get this from del.icio.us:

        

If I then go to the address bar and press enter, it changes to:

      

Any ideas how to get it to work directly from the bookmarks?

,

Can you sniff the traffic to find what’s actually being sent? Is it sending any auth data at all and it’s incorrect or being presented in a form the server doesn’t like, or is it never being sent by firefox at all?

That’s the answer Http Auth in a Firefox 3 bookmarklet, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you

Read More  What’s your opinion on using UUIDs as database row identifiers, particularly in web apps?