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

com.github.kristofa.brave.spring.SpringHttpClientRequest Maven / Gradle / Ivy

There is a newer version: 3.7.0
Show newest version
package com.github.kristofa.brave.spring;

import com.github.kristofa.brave.http.HttpClientRequest;
import org.springframework.http.HttpRequest;

import java.net.URI;

class SpringHttpClientRequest implements HttpClientRequest {
    private final HttpRequest request;

    SpringHttpClientRequest(final HttpRequest request) {
        this.request = request;
    }

    @Override
    public void addHeader(final String header, final String value) {
        request.getHeaders().add(header, value);
    }

    @Override
    public URI getUri() {
        return request.getURI();
    }

    @Override
    public String getHttpMethod() {
        return request.getMethod().name();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy