code: protected static CloseableHttpResponse putResource(String json, String fullURL) throws ClientProtocolException,
        IOException, URISyntaxException {
      try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
        // There is no need to provide user credentials
        // HttpClient will attempt to access current user security context
        // through Windows platform specific methods via JNI.
        HttpPut httpput = new HttpPut(new URIBuilder(fullURL).build());
        httpput.setHeader("Content-Type", "application/json;charset=UTF-8");
        httpput.setEntity(new StringEntity(json, "UTF-8"));
  
        LOG.debug("Executing request " + httpput.getRequestLine());
        return httpclient.execute(httpput);
      }
  
    }
docs: Calls a PUT routine with given JSON on given resource URL.
  
  @param json the input JSON
  @param fullURL the resource URL
  @return Response
  @throws ClientProtocolException if an error exists in the HTTP protocol
  @throws IOException IO Error
  @throws URISyntaxException url is not valid