A problem when implementing the java client of chef

Hello folks,
I’m trying to implement a java client of the chef-server, and I’ve
implemented the registration and authentication of nodes. But after that, I
still get the “401 Unauthorized” error when I try to http get “
http://localhost:4000/nodes/mylaptop”.

Can you give any help or advices about this?

Thanks
Dikang