Skip to content

Instantly share code, notes, and snippets.

@ctoestreich
Last active March 15, 2020 01:20
Show Gist options
  • Save ctoestreich/8e1748b13da8ee880a796922bb9f3157 to your computer and use it in GitHub Desktop.
Save ctoestreich/8e1748b13da8ee880a796922bb9f3157 to your computer and use it in GitHub Desktop.
HeadlineClient
package com.foo.http.client;
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.Get;
import io.micronaut.http.client.annotation.Client;
import io.reactivex.Flowable;
import reactor.core.publisher.Flux;
@Client("/streaming")
public interface HeadlineClient {
@Get(value = "/headlines", processes = MediaType.APPLICATION_JSON_STREAM)
Flowable<Headline> streamHeadlines();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment