开发者

An HTTP POST, authenticated with the key Android

I had t开发者_C百科o do HTTP POST, authenticated with the key. I had the key with me and also url.

But am getting 400 response code i.e, bad request error.

My code is:

Authenticator.setDefault(new Authenticator() {
                    protected PasswordAuthentication getPasswordAuthentication() {
                       return new PasswordAuthentication("sixxxxxxxx","xxxxxxxxxTGh7fYbA:xxxxxxoRtGnOIb_vno1wQ".toCharArray());
                       }
                });

I found this is for username and password. But i want to authenticate with specific key only

How to do this?

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜