I am using spring webclient to make a Facebook graph api request with url containing {comment_count}
But, getting this exception
java.lang.IllegalArgumentException: Not enough variable values available to expand reactive spring
Code Snippet :
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
@Component
public class Stackoverflow {
WebClient client = WebClient.create();
public Mono<Post> fetchPost(String url) {
// Url contains "comments{comment_count}"
return client.get().uri(url).retrieve()
.bodyToMono(Post.class);
}
}
I know the solution with resttemplate, But i need to use spring webclient.