Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 3551916

Browse files
committed
Use hyper to handle http2
1 parent 7ddd765 commit 3551916

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

orbitdbapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.1.0.rc.2.1'
1+
__version__ = '0.2.0.rc.1.1'

orbitdbapi/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
import requests
44
from .db import DB
5+
from hyper.contrib import HTTP20Adapter
56
from urllib.parse import quote as urlquote
67

78
class OrbitDbAPI ():
@@ -11,6 +12,7 @@ def __init__ (self, **kwargs):
1112
self.__base_url = self.__config.get('base_url')
1213
self.__use_db_cache = self.__config.get('use_db_cache', True)
1314
self.__session = requests.Session()
15+
self.__session.mount(self.__base_url, HTTP20Adapter())
1416

1517
@property
1618
def use_db_cache(self):

0 commit comments

Comments
 (0)