Hoogle Search
Within LTS Haskell 24.46 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
setAuthorizationBasic :: ByteString -> ByteString -> RequestBuilder ()http-common Network.Http.Types Set username and password credentials per the HTTP basic authentication method.
setAuthorizationBasic "Aladdin" "open sesame"
will result in an Authorization: header value of Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==. Basic authentication does not use a message digest function to encipher the password; the above string is only base-64 encoded and is thus plain-text visible to any observer on the wire and all caches and servers at the other end, making basic authentication completely insecure. A number of web services, however, use SSL to encrypt the connection that then use HTTP basic authentication to validate requests. Keep in mind in these cases the secret is still sent to the servers on the other side and passes in clear through all layers after the SSL termination. Do not use basic authentication to protect secure or user-originated privacy-sensitve information.setContentLength :: Int64 -> RequestBuilder ()http-common Network.Http.Types Specify the length of the request body, in bytes. RFC 2616 requires that we either send a Content-Length header or use Transfer-Encoding: chunked. If you know the exact size ahead of time, then call this function; the body content will still be streamed out by io-streams in more-or-less constant space. This function is special: in a PUT or POST request, http-streams will assume chunked transfer-encoding unless you specify a content length here, in which case you need to ensure your body function writes precisely that many bytes.
setContentMultipart :: Boundary -> RequestBuilder ()http-common Network.Http.Types If sending multipart form data (RFC 7578), you need to set the MIME type to "multipart/form-data" and specify the boundary separator that will be used. This function is special: you must subsequently use multipartFormBody to sequence the individual body parts. When sending the request it will separate the individual parts by the boundary value set by this function.
setContentType :: ContentType -> RequestBuilder ()http-common Network.Http.Types Set the MIME type corresponding to the body of the request you are sending. Defaults to "text/plain", so usually you need to set this if PUTting.
setExpectContinue :: RequestBuilder ()http-common Network.Http.Types Specify that this request should set the expectation that the server needs to approve the request before you send it. This function is special: in a PUT or POST request, http-streams will wait for the server to reply with an HTTP/1.1 100 Continue status before sending the entity body. This is handled internally; you will get the real response (be it successful 2xx, client error, 4xx, or server error 5xx) in receiveResponse. In theory, it should be 417 if the expectation failed. Only bother with this if you know the service you're talking to requires clients to send an Expect: 100-continue header and will handle it properly. Most servers don't do any precondition checking, automatically send an intermediate 100 response, and then just read the body regardless, making this a bit of a no-op in most cases.
setHeader :: ByteString -> ByteString -> RequestBuilder ()http-common Network.Http.Types Set a generic header to be sent in the HTTP request. The other methods in the RequestBuilder API are expressed in terms of this function, but we recommend you use them where offered for their stronger types.
setHostname :: Hostname -> Port -> RequestBuilder ()http-common Network.Http.Types Set the [virtual] hostname for the request. In ordinary conditions you won't need to call this, as the Host: header is a required header in HTTP 1.1 and is set directly from the name of the server you connected to when calling openConnection.
setTransferEncoding :: RequestBuilder ()http-common Network.Http.Types Override the default setting about how the entity body will be sent. This function is special: this explicitly sets the Transfer-Encoding: header to chunked and will instruct the library to actually tranfer the body as a stream ("chunked transfer encoding"). See setContentLength for forcing the opposite. You really won't need this in normal operation, but some people are control freaks.
setting :: Identical f => ((a -> b) -> s -> t) -> LensLike f s t a blens-family-core Lens.Family.Unchecked setting promotes a "semantic editor combinator" to a modify-only lens. To demote a lens to a semantic edit combinator, use the section (l %~) or over l from Lens.Family.
>>> [("The",0),("quick",1),("brown",1),("fox",2)] & setting map . fstL %~ length [(3,0),(5,1),(5,1),(3,2)]Caution: In order for the generated family to be well-defined, you must ensure that the two functors laws hold:sec id === id
sec f . sec g === sec (f . g)
setTagRendering :: (Event -> TagRender) -> FormatOptions -> FormatOptionslibyaml Text.Libyaml Control when and whether tags are rendered to output.