Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 47cc7ea6e37b741d764b30b7b73842468a964cff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*******************************************************************************
 * Copyright (c) 2015, 2017 Frank Becker and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Frank Becker - initial API and implementation
 *     Red Hat Inc. - modified for use with OpenShift.io
 *******************************************************************************/

package org.eclipse.linuxtools.internal.mylyn.osio.rest.core;

import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;
import org.eclipse.mylyn.commons.repositories.http.core.CommonHttpClient;

@SuppressWarnings("restriction")
public abstract class OSIORestPostRequest<T> extends OSIORestRequest<T> {

	public OSIORestPostRequest(CommonHttpClient client, String urlSuffix, boolean authenticationRequired) {
		super(client, urlSuffix, authenticationRequired, false);
	}

	@Override
	protected HttpRequestBase createHttpRequestBase(String url) {
		HttpPost request = new HttpPost(url);
		request.setHeader(CONTENT_TYPE, APPLICATION_VND_JSON);
		return request;
	}

}

Back to the top