Package net.sourceforge.processdash.util

Examples of net.sourceforge.processdash.util.ClientHttpRequest


        if (userId == null)
            userId = getUserId();
        if (userId != null && userId.length() > 15)
            userId = userId.substring(0, 14) + "*";

        ClientHttpRequest request = new ClientHttpRequest(remoteUrl);
        request.setParameter(VERSION_PARAM, CLIENT_VERSION);
        request.setParameter(ACTION_PARAM, action);
        maybeSetParameter(request, EXTRA_INFO_PARAM, userName);
        maybeSetParameter(request, USER_ID_PARAM, userId);
        maybeSetParameter(request, SOURCE_IDENTIFIER, sourceIdentifier);
        maybeSetParameter(request, EXTRA_LOCK_DATA, extraLockData);
        try {
            InputStream in = request.post(params);
            if (responseAnalyzer != null)
                responseAnalyzer.analyze(request.getConnection());
            return FileUtils.slurpContents(in, true);
        } catch (IOException ioe) {
            checkForLockException(request.getConnection());
            throw ioe;
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.util.ClientHttpRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.