class RESTEndpoint {

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();

        result.append("path+params=");
        result.append(path);
        result.append(paramsToString());
        result.append(" method: ");
        result.append(httpMethod.toString());

        if (postData.length() > 0) {
            result.append(" post data ");
            if (postData.toLowerCase().contains("password")) {
                result.append(postData.length() + " bytes of POST data (hidden as it appears to contain a password)");
            } else {
                result.append(postData);
            }
        }

        if (!headers.isEmpty()) {
            result.append(" headers:");
            result.append("\n");
            result.append(headersToString());
        }
        return result.toString();
    }

    private  RESTEndpoint(RESTEndpointBuilder builder);

}