Skip to content
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

Client: Remove old deprecated methods. #3322

Merged
merged 1 commit into from Apr 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 0 additions & 16 deletions client/src/main/scala/org/http4s/client/Client.scala
Expand Up @@ -155,9 +155,6 @@ trait Client[F[_]] {
* successful */
def successful(req: F[Request[F]]): F[Boolean]

@deprecated("Use expect", "0.14")
def prepAs[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[A]

/** Submits a GET request, and provides a callback to process the response.
*
* @param uri The URI to GET
Expand All @@ -175,19 +172,6 @@ trait Client[F[_]] {
*/
def get[A](s: String)(f: Response[F] => F[A]): F[A]

/**
* Submits a GET request and decodes the response. The underlying HTTP
* connection is closed at the completion of the decoding.
*/
@deprecated("Use expect", "0.14")
def getAs[A](uri: Uri)(implicit d: EntityDecoder[F, A]): F[A]

@deprecated("Use expect", "0.14")
def getAs[A](s: String)(implicit d: EntityDecoder[F, A]): F[A]

@deprecated("Use expect", "0.14")
def prepAs[T](req: F[Request[F]])(implicit d: EntityDecoder[F, T]): F[T]

/**
* Translates the effect type of this client from F to G
*/
Expand Down
20 changes: 0 additions & 20 deletions client/src/main/scala/org/http4s/client/DefaultClient.scala
Expand Up @@ -211,10 +211,6 @@ private[http4s] abstract class DefaultClient[F[_]](implicit F: Bracket[F, Throwa
def successful(req: F[Request[F]]): F[Boolean] =
req.flatMap(successful)

@deprecated("Use expect", "0.14")
def prepAs[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[A] =
fetchAs(req)(d)

/** Submits a GET request, and provides a callback to process the response.
*
* @param uri The URI to GET
Expand All @@ -234,22 +230,6 @@ private[http4s] abstract class DefaultClient[F[_]](implicit F: Bracket[F, Throwa
def get[A](s: String)(f: Response[F] => F[A]): F[A] =
Uri.fromString(s).fold(F.raiseError, uri => get(uri)(f))

/**
* Submits a GET request and decodes the response. The underlying HTTP
* connection is closed at the completion of the decoding.
*/
@deprecated("Use expect", "0.14")
def getAs[A](uri: Uri)(implicit d: EntityDecoder[F, A]): F[A] =
fetchAs(Request[F](Method.GET, uri))(d)

@deprecated("Use expect", "0.14")
def getAs[A](s: String)(implicit d: EntityDecoder[F, A]): F[A] =
Uri.fromString(s).fold(F.raiseError, uri => expect[A](uri))

@deprecated("Use expect", "0.14")
def prepAs[T](req: F[Request[F]])(implicit d: EntityDecoder[F, T]): F[T] =
fetchAs(req)

private def defaultOnError(resp: Response[F])(implicit F: Applicative[F]): F[Throwable] =
F.pure(UnexpectedStatus(resp.status))
}