static HttpRequest putRequest()

in buildSrc/src/main/groovy/HttpUtil.groovy [40:48]


    static HttpRequest putRequest(url, String json, user, password) {
        def body = HttpRequest.BodyPublishers.ofString(json)
        HttpRequest.newBuilder()
                .uri(new URI(url))
                .header('Authorization', 'Basic ' + "$user:$password".getBytes('iso-8859-1').encodeBase64())
                .header('Content-Type', 'application/json')
                .PUT(body)
                .build()
    }