Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Mar 31, 2019
1 parent 5e06ee5 commit 133be59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/endpoint/codecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def decode(s: String): DecodeResult[MyId] = MyId.parse(s) match {
}
def encode(id: MyId): String = id.toString

implicit val myIdCodec: Codec[MyId, TextPlain, _] = Codec.stringPlainCodecUtf8.mapDecode(decode)(encode)
implicit val myIdCodec: Codec[MyId, TextPlain, _] = Codec.stringPlainCodecUtf8
.mapDecode(decode)(encode)
```

Additionally, if a type is supported by a codec, it can be used in multiple contexts, such as query parameters, headers,
Expand Down
3 changes: 2 additions & 1 deletion doc/endpoint/implicits.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def decode(s: String): DecodeResult[MyId] = MyId.parse(s) match {
}
def encode(id: MyId): String = id.toString

implicit val myIdCodec: Codec[MyId, TextPlain, _] = Codec.stringPlainCodecUtf8.mapDecode(decode)(encode)
implicit val myIdCodec: Codec[MyId, TextPlain, _] = Codec.stringPlainCodecUtf8
.mapDecode(decode)(encode)
```

## Text and binary bodies
Expand Down

0 comments on commit 133be59

Please sign in to comment.