Skip to content

Instantly share code, notes, and snippets.

@jeroen
Last active November 24, 2016 17:27
Show Gist options
  • Select an option

  • Save jeroen/a1a70ad1647f61af1860910c79badd4b to your computer and use it in GitHub Desktop.

Select an option

Save jeroen/a1a70ad1647f61af1860910c79badd4b to your computer and use it in GitHub Desktop.
Monkeylearn HTTP2 POST connection failures
# To install curl with HTTP2 on MacOS:
brew reinstall curl --with-nghttp2
brew link --force curl
curl --version # must be 7.51.0
# Example that fails with HTTP2
curl -v https://api.monkeylearn.com/v2/classifiers/test/classify/ \
-d '{"text_list":["my dog is an avid rice eater","i want to buy an iphone"]}'
# Error:
* We are completely uploaded and fine
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
* HTTP/2 stream 1 was not closed cleanly: REFUSED_STREAM (err 7)
* Curl_http_done: called premature == 1
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment