@@ -175,6 +175,7 @@ module Network.HTTP.Req
175175 -- *** Authentication
176176 -- $authentication
177177 , basicAuth
178+ , basicAuthUnsafe
178179 , oAuth1
179180 , oAuth2Bearer
180181 , oAuth2Token
@@ -1180,7 +1181,19 @@ basicAuth
11801181 :: ByteString -- ^ Username
11811182 -> ByteString -- ^ Password
11821183 -> Option 'Https -- ^ Auth 'Option'
1183−basicAuth username password = asFinalizer
1184+basicAuth = basicAuthUnsafe
1185+
1186+-- | An alternative to 'basicAuth' which works for any scheme. Note that
1187+-- using basic access authentication without SSL/TLS is vulnerable to
1188+-- attacks. Use 'basicAuth' instead unless you know what you are doing.
1189+--
1190+-- @since 0.3.1
1191+
1192+basicAuthUnsafe
1193+ :: ByteString -- ^ Username
1194+ -> ByteString -- ^ Password
1195+ -> Option scheme -- ^ Auth 'Option'
1196+basicAuthUnsafe username password = asFinalizer
11841197 (pure . L.applyBasicAuth username password)
11851198
11861199-- | The 'Option' adds OAuth1 authentication.