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

io.github.openunirest.request.UriFormatter Maven / Gradle / Ivy

The newest version!
package io.github.openunirest.request;

import io.github.openunirest.http.exceptions.UnirestException;
import org.apache.http.client.utils.URIBuilder;

import java.net.URISyntaxException;
import java.util.function.Function;

class UriFormatter implements Function {
    @Override
    public String apply(HttpRequest request) {
        try {
            return new URIBuilder(request.getUrl()).toString();
        } catch (URISyntaxException e) {
            throw new UnirestException(e);
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy