+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. 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
+ */
package org.opendaylight.controller.sal.restconf.impl.test;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.MediaType;
-
import com.google.common.base.Charsets;
public class RestOperationUtils {
private RestOperationUtils() {
}
- static Entity<String> entity(String data, MediaType mediaType) {
- return Entity.entity(data, mediaType);
- }
-
- static Entity<String> entity(String data, String mediaType) {
- return Entity.entity(data, mediaType);
- }
-
static String createUri(String prefix, String encodedPart) throws UnsupportedEncodingException {
return URI.create(prefix + URLEncoder.encode(encodedPart, Charsets.US_ASCII.name()).toString()).toASCIIString();
}