on master help sign in
More corrections related to the fresh URL section
524a5b3mrkkrp
Network/HTTP/Req.hs+16−12
@@ -25,14 +25,15 @@
25--
25--
26-- “Type-safe” means that the library is protective and eliminates certain
26-- “Type-safe” means that the library is protective and eliminates certain
27-- class of errors compared to alternative libraries like @wreq@ or vanilla
27-- class of errors compared to alternative libraries like @wreq@ or vanilla
28+-- @http-client@. For example we have correct-by-construction 'Url's, it's
28−-- @http-client@. For example it makes sure that user does not send request
29+-- guaranteed that user does not send request body when using methods like
29−-- body when using methods like 'GET' or 'DELETE', minimizes amount of
30+-- 'GET' or 'DELETE', amount of implicit assumptions is minimized by making
30−-- implicit assumptions making user specify his\/her intentions in explicit
31+-- user specify his\/her intentions in explicit form (for example it's not
31−-- form (for example it's not possible to avoid specifying body or method of
32+-- possible to avoid specifying body or method of a request). It carefully
32−-- a request). It carefully hides underlying types from lower-level
33+-- hides underlying types from lower-level @http-client@ package because
33−-- @http-client@ package because it's not type safe enough (for example
34+-- it's not type safe enough (for example 'L.Request' is an instance of
34−-- 'L.Request' is an instance of 'Data.String.IsString' and if it's
35−-- malformed, it will blow up at run-time).
35+-- 'Data.String.IsString' and if it's malformed, it will blow up at
36+-- run-time).
36--
37--
37-- “Expandable” refers to the ability of the library to be expanded without
38-- “Expandable” refers to the ability of the library to be expanded without
38-- ugly hacking. For example it's possible to define your own HTTP methods,
39-- ugly hacking. For example it's possible to define your own HTTP methods,
@@ -403,17 +404,20 @@ instance HttpMethod method => RequestComponent (Womb "method" method) where
403--
404--
404-- ==== __Examples__
405-- ==== __Examples__
405--
406--
406−-- > -- http://httpbin.org
407-- > http "httpbin.org"
407-- > http "httpbin.org"
408+-- > -- http://httpbin.org
408--
409--
409−-- > -- https://httpbin.org
410-- > https "httpbin.org"
410-- > https "httpbin.org"
411+-- > -- https://httpbin.org
411--
412--
412−-- > -- https://httpbin.org/encoding/utf8
413-- > https "httpbin.org" /: "encoding" /: "utf8"
413-- > https "httpbin.org" /: "encoding" /: "utf8"
414+-- > -- https://httpbin.org/encoding/utf8
415+--
416+-- > https "httpbin.org" /: "foo" /: "bar/baz"
417+-- > -- https://httpbin.org/foo/bar%2Fbaz
414--
418--
415−-- > -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84
416-- > https "юникод.рф"
419-- > https "юникод.рф"
420+-- > -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84
417
421
418data Url = Url Bool (NonEmpty Text)
422data Url = Url Bool (NonEmpty Text)
419 -- NOTE The first 'Bool' value specifies if the 'Url' has “https” as its
423 -- NOTE The first 'Bool' value specifies if the 'Url' has “https” as its