Skip to content

Commit

Permalink
refactor: rename method on Client (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath authored Feb 9, 2022
1 parent 0c0fda2 commit 4b760b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions zio-http/src/main/scala/zhttp/service/Client.scala
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ object Client {
) extends HeaderExtension[ClientRequest] {
self =>

def bodyAsString: Task[String] = getBodyAsByteBuf.map(_.toString(headers.charset))
def bodyAsString: Task[String] = bodyAsByteBuf.map(_.toString(headers.charset))

def remoteAddress: Option[InetAddress] = {
if (channelContext != null && channelContext.channel().remoteAddress().isInstanceOf[InetSocketAddress])
Expand All @@ -190,7 +190,7 @@ object Client {
override def updateHeaders(update: Headers => Headers): ClientRequest =
self.copy(headers = update(self.headers))

private[zhttp] def getBodyAsByteBuf: Task[ByteBuf] = data.toByteBuf
private[zhttp] def bodyAsByteBuf: Task[ByteBuf] = data.toByteBuf
}

final case class ClientResponse(status: Status, headers: Headers, private[zhttp] val buffer: ByteBuf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait EncodeClientRequest {
* Converts client params to JFullHttpRequest
*/
def encode(req: Client.ClientRequest): Task[FullHttpRequest] =
req.getBodyAsByteBuf.map { content =>
req.bodyAsByteBuf.map { content =>
val method = req.method.toJava
val jVersion = req.version.toJava

Expand Down

0 comments on commit 4b760b4

Please sign in to comment.