fix uri bug
@@ -40,7 +40,6 @@ import reactor.core.publisher.Mono;
import reactor.retry.Backoff;
import reactor.retry.Retry;
-import java.net.URI;
import java.time.Duration;
import java.util.Objects;
import java.util.Optional;
@@ -75,7 +74,7 @@ public class WebClientPlugin implements ShenyuPlugin {
int retryTimes = (int) Optional.ofNullable(exchange.getAttribute(Constants.HTTP_RETRY)).orElse(0);
log.info("The request urlPath is {}, retryTimes is {}", urlPath, retryTimes);
HttpMethod method = HttpMethod.valueOf(exchange.getRequest().getMethodValue());
- WebClient.RequestBodySpec requestBodySpec = webClient.method(method).uri(URI.create(urlPath));
+ WebClient.RequestBodySpec requestBodySpec = webClient.method(method).uri(urlPath);
return handleRequestBody(requestBodySpec, exchange, timeout, retryTimes, chain);
}
