private boolean handlePost(HttpServletRequest request, HttpServletResponse response, String pathString) throws IOException, JSONException,
ServletException, URISyntaxException, CoreException, NoHeadException, NoMessageException, ConcurrentRefUpdateException,
WrongRepositoryStateException {
// make sure required fields are set
JSONObject toAdd = OrionServlet.readJSONRequest(request);
if (toAdd.optBoolean(GitConstants.KEY_PULL, false)) {
GitUtils.createGitCredentialsProvider(toAdd);
GitCredentialsProvider cp = GitUtils.createGitCredentialsProvider(toAdd);
boolean force = toAdd.optBoolean(GitConstants.KEY_FORCE, false);
return pull(request, response, cp, pathString, force);
}