Questions about the Haskell HTTP client library req.
Questions tagged [haskell-req]
6 questions
4
votes
1 answer
Why can a parameter accept any construction of a typeclass but its value can't be constructed conditionally?
I'm fairly new to Haskell, though not to programming, and I've been using the req library to perform HTTPS requests.
In order to retain some generality, there will be two types of request - one to create a document (via HTTP POST) and another to…

notquiteamonad
- 1,159
- 2
- 12
- 28
2
votes
0 answers
How to parse something json-like with unquoted keys with aeson?
I am trying to use req library to crawl a page. The response for the page, is almost a JSON object, except for the keys being unquoted.
Is it possible to use Aeson to do relaxed parsing of it?
What could be the simplest hack that I can do with req…

Vinothkumar Raman
- 191
- 8
1
vote
1 answer
Ambiguous type variable ‘a0’ arising from a use of ‘req’
I am trying to retrieve a response from an endpoint using the req Haskell package.
I understand that I need to use a type annotation to specify what 'a0' should be but I'm not sure what 'a0' is referring to and what type I should give it.
{-#…

timothyylim
- 1,399
- 2
- 14
- 32
1
vote
1 answer
Disable SSL certificate validation in Haskell `req` library
How to disable SSL certificate validation when using the Haskell req library? Similar to curl -k.

Sridhar Ratnakumar
- 81,433
- 63
- 146
- 187
0
votes
0 answers
Haskell req package: how to use withReqManager to reuse connection for many requests to the same host?
I would like to reuse a HTTPS connection for many requests to keep latency as low as possible for every request to the same host. Using the haskell package req, if I send too many requests in a short period of time then it seems I might be reaching…

Anon
- 375
- 1
- 7
0
votes
1 answer
How to process HttpResponseBody in Haskell req?
I have an application that gets JSON response from an API and I'm trying to get a specific key from that response. The working code looks as below:
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Data.Aeson
import…

trivelt
- 1,913
- 3
- 22
- 44