Forum Stats

  • 3,769,694 Users
  • 2,253,008 Discussions


How to consume rest API (POST Method) with basic authentication using java?

Dear Experts,

We have a restful API (POST) which have basic authentication (username and password) and some query parameters with type string .

I can test the API in the postman and it working fine . What I need is writing a jave code which allow me to call this API from my custom java application .

I found many links but I got confused . please advise .

I’m working on Jdeveloper and I’m using jersy jax rs2 .

Thanks in advance