Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amitksingh1490 committed Jan 21, 2022
1 parent 5c48b00 commit 6d3a5e9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions docs/website/docs/v1.x/dsl/headers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ val response = Client.request(url, headers)
- The sample below shows how a header could be added to a client request:

```scala
import zhttp.http.{HeaderNames, HeaderValues, Headers}
import zhttp.service.{ChannelFactory, Client, EventLoopGroup}
import zio.{App, ExitCode, URIO, console}
import zhttp.http._
import zhttp.service._
import zio._

object SimpleClientJson extends App {
val env = ChannelFactory.auto ++ EventLoopGroup.auto()
Expand Down Expand Up @@ -217,12 +217,8 @@ Headers DSL provides plenty of powerful operators that can be used to add, remov
- Checks - Provides a list of operators that checks if the `Headers` meet the give constraints.

```scala
import com.sun.net.httpserver.Headers

// check if Accept header is present
val contentTypeHeader: Headers = Headers.contentType(HeaderValues.applicationJson)
val isHeaderPresent: Boolean = contentTypeHeader.hasHeader(HeaderNames.contentType)

val isHeaderPresent: Boolean = contentTypeHeader.hasHeader(HeaderNames.contentType)
val isJsonContentType: Boolean = contentTypeHeader.hasJsonContentType


Expand Down

1 comment on commit 6d3a5e9

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance Benchmark:

Concurrency: 256
Requests/sec: 911013.82

Please sign in to comment.