From 6d3a5e99c6f062837c5db38a8cd69eb9aa694d83 Mon Sep 17 00:00:00 2001 From: amitsingh Date: Fri, 21 Jan 2022 20:57:13 +0530 Subject: [PATCH] minor changes --- docs/website/docs/v1.x/dsl/headers/index.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/website/docs/v1.x/dsl/headers/index.md b/docs/website/docs/v1.x/dsl/headers/index.md index c9da31e20e..6ec244325b 100644 --- a/docs/website/docs/v1.x/dsl/headers/index.md +++ b/docs/website/docs/v1.x/dsl/headers/index.md @@ -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() @@ -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