Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
26bba2a
http-types.cabal: adjusted for new maintainership, and bumping the mi…
Vlix Nov 18, 2023
39e93db
Method: added @since notation and tweaked some documentation
Vlix Nov 18, 2023
c95c385
Types: added some documentation and extra subtitles in the main modul…
Vlix Nov 18, 2023
05617b7
Method: small doc adjustment
Vlix Nov 18, 2023
26d5a41
Version: small cleanup and @since notation
Vlix Nov 19, 2023
c4465d5
Status: added @since notations and bit of cleanup
Vlix Nov 19, 2023
8021cf1
Status: added comments for when we'd might want to initiate the depre…
Vlix Nov 19, 2023
9ecc81b
Method: used fourmolu to format and fixed comments for the 'method*' …
Vlix Nov 19, 2023
b7f2101
Version: used formatter
Vlix Nov 19, 2023
0372fe8
Status: added more documentation and formatted
Vlix Nov 19, 2023
449e7bf
QueryLike: formatted and made imports more explicit
Vlix Nov 19, 2023
ab25413
Header: formatted
Vlix Nov 19, 2023
a3c7022
URI: formatted
Vlix Nov 19, 2023
d86df29
Status: added a bit more documentation
Vlix Nov 19, 2023
d3dcffb
Types: formatted export list
Vlix Nov 19, 2023
ce185d9
Header: added links to RFC mentions and added @since notations, with …
Vlix Nov 20, 2023
c13d6a8
Header: added @since notations to all the header constants
Vlix Nov 20, 2023
4c38d75
QueryLike: added @since notations
Vlix Nov 20, 2023
850ad47
URI: adjusted and added some documentation
Vlix Nov 20, 2023
4bdd3e4
URI: adjusted and added lots of documentation
Vlix Nov 21, 2023
d96f378
some general documentation additions/adjustments
Vlix Nov 21, 2023
2bc9536
QueryLike: only added '@since' declarations to the class definitions
Vlix Nov 29, 2023
f72703e
documentation fixes
Vlix Nov 29, 2023
612a5f2
URI: updated documentation and added @since declarations
Vlix Nov 30, 2023
3927d6a
Types: added links to the separate modules in the main module, and mo…
Vlix Nov 30, 2023
9baa2a0
CHANGELOG: updated for new release
Vlix Nov 30, 2023
c029e80
Types: revert title change
Vlix Nov 30, 2023
d936b31
URI: emphasis for clarity and better example
Vlix Nov 30, 2023
720e200
URI: fixed typo
Vlix Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
* 0.12.3 [2019-02-24]
# Changelog for `http-types`

Remove now-invalid doctest options from doctests.hs.
## 0.12.4 [2023-11-29]

* 0.12.2 [2018-09-26]
* Add `Data` and `Generic` instances to `ByteRange`, `StdMethod`, `Status` and `HttpVersion`.
* Rework of all the documentation, with the addition of `@since` notations.

Add new parseQueryReplacePlus function, which allows specifying whether to replace '+' with ' '.
## 0.12.3 [2019-02-24]

Add header name constants for "Prefer" and "Preference-Applied" (RFC 7240).
* Remove now-invalid doctest options from `doctests.hs`.

* 0.12.1 [2018-01-31]
## 0.12.2 [2018-09-26]

Add new functions for constructing a query URI where not all parts are escaped.
* Add new `parseQueryReplacePlus` function, which allows specifying whether to replace `'+'` with `' '`.
* Add header name constants for "Prefer" and "Preference-Applied" (RFC 7240).

* 0.12 [2018-01-28]
## 0.12.1 [2018-01-31]

URI encoding is now back to upper-case hexadecimal, as that is the preferred canonicalization, and the previous change caused issues with URI
signing in at least amazonka.
* Add new functions for constructing a query URI where not all parts are escaped.

* 0.11 [2017-11-29]
## 0.12 [2018-01-28]

Remove dependency on blaze-builder. (Note that as a side effect of this, URI encoding is now using lower-case rather than uppercase hexadecimal.)
* URI encoding is now back to upper-case hexadecimal, as that is the preferred canonicalization, and the previous change caused issues with URI signing in at least `amazonka`.

Add Bounded instance to Status.
## 0.11 [2017-11-29]

Re-export more status codes and http20 from Network.HTTP.Types.
* Remove dependency on `blaze-builder`. (Note that as a side effect of this, URI encoding is now using lower-case rather than upper-case hexadecimal.)
* Add `Bounded` instance to `Status`.
* Re-export more status codes and `http20` from `Network.HTTP.Types`.

* 0.10 [2017-10-22]
## 0.10 [2017-10-22]

New status codes, new headers.
* New status codes, new headers.
* Fixed typo in `imATeapot`, added missing `toEnum`.
* Oh, and `http20`.

Fixed typo in imATeapot, added missing toEnum.
## 0.9.1 [2016-06-04]

Oh, and http20.
* New function: `parseByteRanges`.
* Support for HTTP status 422 "Unprocessable Entity" (RFC 4918).

* 0.9.1 [2016-06-04]
## 0.9 [2015-10-09]

New function: parseByteRanges.
Support for HTTP status 422 "Unprocessable Entity" (RFC 4918).

* 0.9 [2015-10-09]

No changelog was maintained up to version 0.9.
* No changelog was maintained up to version `0.9`.
66 changes: 46 additions & 20 deletions Network/HTTP/Types.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
module Network.HTTP.Types (
-- * Methods

-- | __For more information__: "Network.HTTP.Types.Method"

Method,

-- ** Constants
methodGet,
methodPost,
methodHead,
Expand All @@ -11,19 +16,29 @@ module Network.HTTP.Types (
methodOptions,
methodPatch,
StdMethod (..),

-- ** Parsing and redering methods
parseMethod,
renderMethod,
renderStdMethod,

-- * Versions

-- | __For more information__: "Network.HTTP.Types.Version"

HttpVersion (..),
http09,
http10,
http11,
http20,

-- * Status

-- | __For more information__: "Network.HTTP.Types.Status"

Status (..),

-- ** Constants
mkStatus,
status100,
continue100,
Expand Down Expand Up @@ -127,6 +142,8 @@ module Network.HTTP.Types (

-- * Headers

-- | __For more information__: "Network.HTTP.Types.Header"

-- ** Types
Header,
HeaderName,
Expand Down Expand Up @@ -165,24 +182,17 @@ module Network.HTTP.Types (

-- * URI

-- ** Query string
QueryItem,
-- | __For more extensive information__: "Network.HTTP.Types.URI"

-- ** Query strings

-- *** Query
Query,
SimpleQueryItem,
SimpleQuery,
simpleQueryToQuery,
QueryItem,
renderQuery,
renderQueryBuilder,
renderSimpleQuery,
parseQuery,
parseSimpleQuery,

-- ** Escape only parts
renderQueryPartialEscape,
renderQueryBuilderPartialEscape,
EscapeItem (..),
PartialEscapeQueryItem,
PartialEscapeQuery,
parseQueryReplacePlus,

-- *** Text query string (UTF8 encoded)
QueryText,
Expand All @@ -191,22 +201,38 @@ module Network.HTTP.Types (
renderQueryText,
parseQueryText,

-- *** SimpleQuery
SimpleQuery,
SimpleQueryItem,
simpleQueryToQuery,
renderSimpleQuery,
parseSimpleQuery,

-- *** PartialEscapeQuery
PartialEscapeQuery,
PartialEscapeQueryItem,
EscapeItem (..),
renderQueryPartialEscape,
renderQueryBuilderPartialEscape,

-- ** Generalized query types
QueryLike (toQuery),

-- ** Path segments
encodePathSegments,
decodePathSegments,
encodePathSegmentsRelative,
-- ** Path

-- ** Path (segments + query string)
-- *** Segments + Query String
extractPath,
encodePath,
decodePath,

-- *** Path Segments
encodePathSegments,
encodePathSegmentsRelative,
decodePathSegments,

-- ** URL encoding / decoding
urlEncodeBuilder,
urlEncode,
urlEncodeBuilder,
urlDecode,
)
where
Expand Down
Loading