Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Changelog for `http-types`

## 0.13 [unreleased]

* Add support for the QUERY method and Accept-Query response field name from
[RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html).

## 0.12.7 [unreleased]

* Add parsing and rendering functions for `Status`
Expand All @@ -31,6 +26,7 @@
* `hForwarded`
* `hLink`
* `hStrictTransportSecurity`
* Add `hAcceptQuery` response field name from [RFC 10008](https://www.rfc-editor.org/rfc/rfc10008.html).

## 0.12.6 [2026-08-13]

Expand Down
1 change: 0 additions & 1 deletion Network/HTTP/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module Network.HTTP.Types (
methodConnect,
methodOptions,
methodPatch,
methodQuery,
StdMethod (..),

-- ** Parsing and redering methods
Expand Down
17 changes: 1 addition & 16 deletions Network/HTTP/Types/Method.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module Network.HTTP.Types.Method (
methodConnect,
methodOptions,
methodPatch,
methodQuery,

-- ** Standard Methods

Expand Down Expand Up @@ -90,16 +89,8 @@ methodOptions = renderStdMethod OPTIONS
methodPatch :: Method
methodPatch = renderStdMethod PATCH

-- | QUERY Method as defined in
-- <https://www.rfc-editor.org/rfc/rfc10008.html#section-2 RFC 10008, section 2>.
--
-- @since 0.13
methodQuery :: Method
methodQuery = renderStdMethod QUERY

-- | HTTP standard method (as defined by RFC 2616, and PATCH which is defined
-- by RFC 5789, and QUERY which is defined by
-- <https://www.rfc-editor.org/rfc/rfc10008.html#section-2 RFC 10008, section 2>).
-- by RFC 5789).
--
-- @since 0.2.0
data StdMethod
Expand All @@ -113,11 +104,6 @@ data StdMethod
| OPTIONS
| -- | @since 0.8.0
PATCH
| -- | QUERY as defined in
-- <https://www.rfc-editor.org/rfc/rfc10008.html#section-2 RFC 10008, section 2>.
--
-- @since 0.13
QUERY
deriving
( Read
, Show
Expand Down Expand Up @@ -168,4 +154,3 @@ renderStdMethod method =
CONNECT -> "CONNECT"
OPTIONS -> "OPTIONS"
PATCH -> "PATCH"
QUERY -> "QUERY"
2 changes: 1 addition & 1 deletion http-types.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Extra-doc-files:
Source-repository this
type: git
location: https://github.com/Vlix/http-types.git
tag: v0.13.0
tag: v0.12.7

Source-repository head
type: git
Expand Down
4 changes: 0 additions & 4 deletions test/Network/HTTP/Types/MethodSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ spec = do
it "CONNECT" $ methodConnect `shouldBe` "CONNECT"
it "OPTIONS" $ methodOptions `shouldBe` "OPTIONS"
it "PATCH " $ methodPatch `shouldBe` "PATCH"
it "QUERY " $ methodQuery `shouldBe` "QUERY"
it "StdMethod has all constants" $
let methodList =
[ methodGet
Expand All @@ -36,13 +35,10 @@ spec = do
, methodConnect
, methodOptions
, methodPatch
, methodQuery
]
in allMethods `shouldBe` methodList

describe "parse/render method" $ do
it "parses QUERY as a standard method" $
parseMethod methodQuery `shouldBe` Right QUERY
it "round trips" $ do
renderMethod . parseMethod <$> allMethods `shouldBe` allMethods
it "also round trips for any ByteString" $
Expand Down
Loading