Search in sources :

Example 21 with HttpHelper

use of com.centurylink.mdw.common.utilities.HttpHelper in project mdw-designer by CenturyLinkCloud.

the class DesignerDataAccess method importFromVcs.

public void importFromVcs(String mdwWebUrl) throws DataAccessException {
    try {
        HttpHelper httpHelper = currentServer.getHttpHelper(mdwWebUrl + "/Services/GitVcs/*");
        Map<String, String> hdrs = new HashMap<>();
        hdrs.put("request-query-string", "gitAction=pull");
        httpHelper.setHeaders(hdrs);
        httpHelper.setConnectTimeout(getConnectTimeout());
        httpHelper.setReadTimeout(getReadTimeout());
        httpHelper.post("{}");
    } catch (IOException ex) {
        throw new DataAccessException(0, IOEXCEPTION, ex);
    }
}
Also used : HashMap(java.util.HashMap) IOException(java.io.IOException) HttpHelper(com.centurylink.mdw.common.utilities.HttpHelper) DataAccessException(com.centurylink.mdw.common.exception.DataAccessException)

Aggregations

HttpHelper (com.centurylink.mdw.common.utilities.HttpHelper)21 IOException (java.io.IOException)17 DataAccessException (com.centurylink.mdw.common.exception.DataAccessException)10 URL (java.net.URL)9 JSONException (org.json.JSONException)6 XmlException (org.apache.xmlbeans.XmlException)5 SocketTimeoutException (java.net.SocketTimeoutException)4 RemoteException (java.rmi.RemoteException)4 JSONObject (org.json.JSONObject)4 MdwSecurityException (com.centurylink.mdw.auth.MdwSecurityException)3 MDWStatusMessageDocument (com.centurylink.mdw.bpm.MDWStatusMessageDocument)3 HashMap (java.util.HashMap)3 CoreException (org.eclipse.core.runtime.CoreException)3 ActionCancelledException (com.centurylink.mdw.common.utilities.timer.ActionCancelledException)2 DataAccessOfflineException (com.centurylink.mdw.dataaccess.DataAccessOfflineException)2 AppSummary (com.centurylink.mdw.designer.model.AppSummary)2 DesignerHttpHelper (com.centurylink.mdw.designer.utils.DesignerHttpHelper)2 File (com.centurylink.mdw.plugin.designer.model.File)2 FileNotFoundException (java.io.FileNotFoundException)2 GeneralSecurityException (java.security.GeneralSecurityException)2