-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reinstate examples #2139
Reinstate examples #2139
Conversation
faeb1bd
to
591058f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice. I think there's still room for improvement, but it's most important to get these back in business.
@@ -37,6 +38,6 @@ object ClientMultipartPostExample extends IOApp with Http4sClientDsl[IO] { | |||
def run(args: List[String]): IO[ExitCode] = | |||
BlazeClientBuilder[IO](global).resource | |||
.use(go) | |||
.flatMap(s => IO(println)) | |||
.flatMap(s => IO(println(s))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😳
@@ -19,7 +19,7 @@ class GitHubService[F[_]: Sync](client: Client[F]) extends Http4sClientDsl[F] { | |||
|
|||
private val RedirectUri = s"http://localhost:8080/$ApiVersion/login/github" | |||
|
|||
final case class AccessTokenResponse(access_token: String) | |||
case class AccessTokenResponse(access_token: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the final on case classes. It doesn't matter much here, but it's a good habit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, me too, but this one doesn't compile if it's final :)
|
||
logger.trace(s"Adding push resource: $newUrl") | ||
final class PushOps[F[_]: Functor](response: Response[F]) extends AnyRef { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this change makes a lot more sense.
Reinstate examples
Fixes #2107
Updated and re-enabled all the example projects.
There's less inheritance now, and everything should use
F[_]
all the way up toIOApp
.The examples are not 100% consistent with each other.
I updated the push support syntax to operate on
Response[F]
instead ofF[Response[F]]
, to be in line with the syntax on response and request. I did not add a deprecated copy of the old behaviour. I can add that if you guys want it.