Deleted file from evaluation
This commit is contained in:
parent
c7d58f3e58
commit
44caf3b868
|
@ -1,22 +0,0 @@
|
||||||
package com.baeldung.reactive.client;
|
|
||||||
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.web.reactive.function.client.WebClient;
|
|
||||||
import org.springframework.web.reactive.function.client.WebClient.RequestHeadersSpec;
|
|
||||||
|
|
||||||
import com.baeldung.reactive.model.Stock;
|
|
||||||
|
|
||||||
import reactor.core.publisher.Flux;
|
|
||||||
|
|
||||||
public class StockClient {
|
|
||||||
|
|
||||||
public Flux<Stock> getStockUpdates(String stockCode) {
|
|
||||||
WebClient client = WebClient.create("localhost:8080");
|
|
||||||
RequestHeadersSpec<?> request = client.get()
|
|
||||||
.uri("/rtes/stocks/" + stockCode)
|
|
||||||
.accept(MediaType.TEXT_EVENT_STREAM);
|
|
||||||
return request.retrieve()
|
|
||||||
.bodyToFlux(Stock.class)
|
|
||||||
.log();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue