Skip to content

Commit

Permalink
Drop RequestBuilder and other deprecated features that are easily mig…
Browse files Browse the repository at this point in the history
…rated
  • Loading branch information
colin-lamed committed May 7, 2024
1 parent d151982 commit a0cc279
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,11 @@ trait RequestBuilder {

/** Adds the header. If the header has already been defined (e.g. from HeaderCarrier), it will be replaced.
* It does not affect headers not mentioned.
*
* Use `transform(_.addHttpHeaders)` to append header values to existing.
*/
def setHeader(header: (String, String)*): RequestBuilder

@deprecated("Use setHeader", "14.5.0")
def replaceHeader(header: (String, String)): RequestBuilder

@deprecated("Use setHeader to add or replace, or use transform(_.addHttpHeaders) to append header values to existing", "14.5.0")
def addHeaders(headers: (String, String)*): RequestBuilder

def withProxy: RequestBuilder

/** `withBody` should be called rather than `transform(_.withBody)`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ final class RequestBuilderImpl(
override def setHeader(header: (String, String)*): RequestBuilderImpl =
transform(replaceHeaderOnRequest(_, header: _*))

override def replaceHeader(header: (String, String)): RequestBuilderImpl =
setHeader(header)

override def addHeaders(headers: (String, String)*): RequestBuilderImpl =
transform(_.addHttpHeaders(headers: _*))

override def withProxy: RequestBuilderImpl =
transform(request => optProxyServer.foldLeft(request)(_ withProxyServer _))

Expand Down
23 changes: 0 additions & 23 deletions http-verbs-play-30/src/main/scala/uk/gov/hmrc/package.scala

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit a0cc279

Please sign in to comment.