All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.imunity.vaadin.endpoint.common.QueryParamCopier Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
 * See LICENCE.txt file for licensing information.
 */

package io.imunity.vaadin.endpoint.common;

import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

import org.apache.hc.core5.net.URIBuilder;

public class QueryParamCopier
{

	public static URI copyParam(String destination, URL source) throws URISyntaxException
	{
		URIBuilder redirect = new URIBuilder(destination);
		URIBuilder current = new URIBuilder(source.toURI());
		current.getQueryParams().forEach(redirect::addParameter);
		return redirect.build();	
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy