hootnot / oanda-api-v20

OANDA REST-V20 API wrapper. Easy access to OANDA's REST v20 API with oandapyV20 package. Checkout the Jupyter notebooks!
MIT License
398 stars 107 forks source link

"Connection: Keep-Alive" question #90

Closed silgon closed 7 years ago

silgon commented 7 years ago

This is more a question than an issue. It's about the best practices section of the developer references (http://developer.oanda.com/rest-live-v20/best-practices/). They say that you should add a http header with the following content Connection: Keep-Alive. However I ran grep -rn "Connection" . in this repository and I found nothing. I would like to know if you consider this.

hootnot commented 7 years ago

hi @silgon

That docs say also: If you are using an HTTP 1.0 client, ensure it supports the keep-alive directive and submit the header Connection: Keep-Alive with your request.

Keep-Alive is part of the protocol in HTTP 1.1 and enabled by default on compliant clients. However, you will have to ensure your implementation does not set the connection header to other values.

oandapyV20 makes use of the requests library, http://docs.python-requests.org/en/master/, and that does HTTP 1.1. Therefore it is not set.

silgon commented 7 years ago

Thanks for the reply! Just wanted to know. Nice library btw. =)

hootnot commented 7 years ago

thanks