10
10
from ..utils import async_to_sync
11
11
from ..utils .class_or_instance import class_or_instance
12
12
from . import conf
13
- import requests
13
+ #! import requests
14
14
15
15
16
16
__all__ = ['Noirlab' , 'NoirlabClass' ] # specifies what to import
@@ -173,11 +173,11 @@ def query_metadata(self, qspec, limit=1000, cache=True):
173
173
# headers = {'Content-Type': 'application/json'}
174
174
175
175
# Following fails:
176
- # #! response = self._request('POST', url, json=jdata)
176
+ response = self ._request ('POST' , url , json = jdata , timeout = self . TIMEOUT , )
177
177
178
- response = requests .post (url ,
179
- timeout = self .TIMEOUT ,
180
- json = jdata )
178
+ #! response = requests.post(url,
179
+ #! timeout=self.TIMEOUT,
180
+ #! json=jdata)
181
181
response .raise_for_status ()
182
182
# #!print(f'DBG-0: ADS response={response}')
183
183
# #!print(f'DBG-0: ADS response.content={response.content}')
@@ -198,7 +198,7 @@ def version(self, cache=False):
198
198
199
199
def get_token (self , email , password , cache = True ):
200
200
url = f'{ self .NAT_URL } /api/get_token/'
201
- response = requests . post ( url ,
201
+ response = self . _request ( 'POST' , url ,
202
202
json = {"email" : email , "password" : password },
203
203
timeout = self .TIMEOUT )
204
204
response .raise_for_status ()
0 commit comments