How to create a post request with authentication via bearer token using java?

In Java, how do you make a post request using bearer token authentication?

Hey Mark,

User needs to take a reference from below mentioned snippet to create a post request with authentication via bearer token using java:

Request request4 = new Request.Builder()
                .url("Your_Request_URL")
                .method("POST", body)
                
                .addHeader("Authorization", "Basic <--Authorization--token->")
                .build();
        Response response4 = client4.newCall(request4).execute();

        String responsebody4 = response4.body().string();