Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7731589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:31:04+00:00 2026-06-01T06:31:04+00:00

Continuing my quest to perform a dropbox query I am using http-conduit to try

  • 0

Continuing my quest to perform a dropbox query I am using http-conduit to try and perform a POST request, but I am not sure how to construct the Manager object.

Here is what I got so far (and the problematic line):

data DropboxConfig = DropboxConfig { appKey :: String, appSecret :: String}

main = do
    let appKey = "asdfasdfasdfs"
    let appSecret = ";lkj;lkjlkjlkj"
    let config = DropboxConfig {appKey = appKey, appSecret = appSecret}
    let qs = buildQueryString config

    let req = def {method = methodPost, queryString = qs}

    resp <- http req (newManager)  --!Does Not work
    putStrLn $ unpack resp


buildQueryString :: DropboxConfig -> ByteString
buildQueryString config = pack $ "oauth_consumer_key="++(appKey config)++
        "&oauth_signature_method=HMAC-SHA1"++
        "&oauth_timestamp=137131200" ++
        "&oauth_nonce=4572616e48616d6d65724c61686176" ++
        "&oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D

Here is the error I am getting:

    Couldn't match expected type `http-conduit-1.3.0.1:Network.HTTP.Conduit.Manager.Manager'
                with actual type `http-conduit-1.3.0.1:Network.HTTP.Conduit.Manager.ManagerSettings
                                  -> IO http-conduit-1.3.0.1:Network.HTTP.Conduit.Manager.Manager'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:31:05+00:00Added an answer on June 1, 2026 at 6:31 am

    The type signature says it all, really:

    newManager :: ManagerSettings -> IO Manager
    

    This is an IO action, so you’ll have to bind it using <- as always. It also requires ManagerSettings, so you’ll need to provide that. Something like this should do it, I think (not too familiar with the library, just following the types):

    manager <- newManager def
    resp <- http req manager
    

    Though, it might be a better idea to use withManager so you don’t have to worry about closing it yourself.

    withManager $ \manager -> do
      resp <- http req manager
      ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm continuing a previous post , but I thought I'd open a new thread
Continuing quest to make sense of ContT and friends. Please consider the (absurd but
In my continuing quest to try and wrap my mind around RESTful-ness, I've come
Continuing my quest of learning Java by doing a simple game, i stumbled upon
Continuing with the spirit of using the Stack Exchange Data Explorer to learn SQL,
In my continuing adventure with templates, I've templated my Container class not just on
Continuing the discussion from Understanding VS2010 C# parallel profiling results but more to the
Continuing on this problem , but I'll reiterate: For a homework assignment I have
while continuing to learn WCF I've completes the Getting Started Tutorial from http://msdn.microsoft.com/en-us/library/ms734712.aspx and
My quest of starting to use namespaces in PHP keeps continuing. This time PHPUnit

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.