Skip to content

Use CPP so we can work with http-client pre and post 0.5 - #17

Merged
snoyberg merged 2 commits into
fpco:masterfrom
tolysz:cpp-for-new-http-client
Jul 31, 2016
Merged

Use CPP so we can work with http-client pre and post 0.5#17
snoyberg merged 2 commits into
fpco:masterfrom
tolysz:cpp-for-new-http-client

Conversation

@tolysz

@tolysz tolysz commented Jul 30, 2016

Copy link
Copy Markdown
Contributor

The api for http-client changed slightly this CPP allows to use the newer version

Comment thread Network/HTTP/ReverseProxy.hs Outdated
#if MIN_VERSION_http_client(0, 5, 0)
HC.defaultRequest
{ HC.checkResponse = \_ _ -> return ()
, HC.responseTimeout = maybe HC.responseTimeoutNone (HC.responseTimeoutMicro . (1000 *)) $ lpsTimeBound lps

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the 1000 * is correct/necessary here, aren't both values in microseconds?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was wondering that :) but fiveMinutes is in milliseconds (5 * 60 * 1000) i.e. 1/1000; microseconds are 1/1000000.
I was not checking the underlying implementation; just the name.

@snoyberg
snoyberg merged commit d34d7b8 into fpco:master Jul 31, 2016
@snoyberg

Copy link
Copy Markdown
Contributor

Thanks!

snoyberg added a commit that referenced this pull request Jul 31, 2016
@tolysz

tolysz commented Jul 31, 2016

Copy link
Copy Markdown
Contributor Author

happy to help :)

@tolysz
tolysz deleted the cpp-for-new-http-client branch July 31, 2016 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants