Deleted file from evaluation

This commit is contained in:
priyeshmashelkar 2018-07-02 12:30:59 +01:00 committed by GitHub
parent c7d58f3e58
commit 44caf3b868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -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();
}
}