public Content postContent(byte[] buf, MediaType contentType, String userAgentExtra) throws IOException, UnsuccessfulRequestException {
        RequestBody body = RequestBody.create(contentType, buf);

        String userAgent = this.userAgent;
        if (userAgentExtra != null) {
            userAgent += "/" + userAgentExtra;
        }

        Request.Builder requestBuilder = new Request.Builder()
                .url(this.url + "post")
                .header("User-Agent", userAgent)
                .header("Content-Encoding", "gzip");

        Request request = requestBuilder.post(body).build();
        try (Response response = makeHttpRequest(request)) {
            String key = response.header("Location");
            if (key == null) {
                throw new IllegalStateException("Key not returned");
            }
            return new Content(key);
        }
    }
POSTs GZIP compressed content to bytebin.

@param buf the compressed content
@param contentType the type of the content
@param userAgentExtra extra string to append to the user agent
@return the key of the resultant content
@throws IOException if an error occurs
common/src/main/java/me/lucko/luckperms/common/http/BytebinClient.java