Skip to content

fix compile errors in README.md examples #109

Closed
wants to merge 2 commits into from

2 participants

@earldouglas
  • add .name("myService") to use of ServerBuilder
  • replace .codec(Http) with .codec(Http.get()) in use of ServerBuilder and ClientBuilder
@earldouglas earldouglas fix compile errors
* add .name("myService") to use of ServerBuilder
* replace .codec(Http) with .codec(Http.get()) in use of ServerBuilder and ClientBuilder
43890ec
@stevegury stevegury commented on an outdated diff Sep 13, 2012
README.md
@@ -83,8 +83,8 @@ The following server, which is shown in both Scala and Java, responds to a clien
val address: SocketAddress = new InetSocketAddress(10000) // 3
- val server: Server[HttpRequest, HttpResponse] = ServerBuilder() // 4
- .codec(Http)
+ val server: Server = ServerBuilder() // 4
+ .codec(Http.get())
@stevegury
stevegury added a note Sep 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stevegury stevegury commented on an outdated diff Sep 13, 2012
README.md
@@ -128,7 +128,7 @@ The client, which is shown in both Scala and Java, connects to the server, and i
##### Scala HTTP Client Implementation
val client: Service[HttpRequest, HttpResponse] = ClientBuilder() // 1
- .codec(Http)
+ .codec(Http.get())
@stevegury
stevegury added a note Sep 13, 2012

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stevegury stevegury commented on an outdated diff Sep 13, 2012
README.md
@@ -1035,7 +1035,8 @@ The following example encapsulates the filters and service in the previous examp
= handleExceptions andThen authorize andThen respond
val server: Server = ServerBuilder()
- .codec(Http)
+ .name("myService")
+ .codec(Http.get())
@stevegury
stevegury added a note Sep 13, 2012

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stevegury stevegury commented on an outdated diff Sep 13, 2012
README.md
@@ -1052,7 +1053,7 @@ In this example, the `HandleExceptions` filter is executed before the `authorize
A robust client has little to do with the lines of code (SLOC) that goes into it; rather, the robustness depends on how you configure the client and the testing you put into it. Consider the following HTTP client:
val client = ClientBuilder()
- .codec(Http)
+ .codec(Http.get())
@stevegury
stevegury added a note Sep 13, 2012

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@stevegury

Thank you James for fixing this.
I pulled this internally, it will be merged in the github repo soon (a couple of days).

@stevegury stevegury closed this Sep 15, 2012
@kil9 kil9 pushed a commit to kil9/finagle that referenced this pull request Feb 26, 2014
@earldouglas earldouglas [split] fix compile errors in README.md examples * add .name("myServi…
…ce") to use of ServerBuilder * replace .codec(Http) with .codec(Http.get()) in use of ServerBuilder and ClientBuilder Github-pull-request: twitter#109

Signed-off-by: Steve Gury <stevegury@twitter.com>

RB_ID=86675
8f8c163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.