Skip to content

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

Merged
snoyberg merged 2 commits intofpco: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 intofpco:masterfrom
tolysz:cpp-for-new-http-client

Conversation

@tolysz
Copy link
Copy Markdown
Contributor

@tolysz tolysz commented Jul 30, 2016

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

#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
Member

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
Member

Thanks!

snoyberg added a commit that referenced this pull request Jul 31, 2016
@tolysz
Copy link
Copy Markdown
Contributor Author

tolysz commented Jul 31, 2016

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