--TODO possibly extract helper function of the last line which is reused in all HTTP operator functions


get :: FireRequest -> IO FireResponse
get (FireRequest url opts) = do
                                let validation = validateGet opts
                                let pars = buildParameters opts
                                response <- WR.get (url ++ "?" ++ pars)
                                return $ FireResponse (response ^. WR.responseBody) (response ^. WR.responseStatus . WR.statusCode) (response ^. WR.responseHeaders)
get :: FireRequest -> IO FireResponse
get (FireRequest url opts) = do
                                let validation = validateGet opts
                                let pars = buildParameters opts
                                response <- WR.get (url ++ "?" ++ pars)
                                return $ FireResponse (response ^. WR.responseBody) (response ^. WR.responseStatus . WR.statusCode) (response ^. WR.responseHeaders)
get (FireRequest url opts) = do
                                let validation = validateGet opts
                                let pars = buildParameters opts
                                response <- WR.get (url ++ "?" ++ pars)
                                return $ FireResponse (response ^. WR.responseBody) (response ^. WR.responseStatus . WR.statusCode) (response ^. WR.responseHeaders)