Correct query_objectids_async behavior when get_query_payload=True
@@ -907,9 +907,14 @@ class SimbadClass(BaseQuery):
"""
request_payload = dict(script="\n".join(('format object "%IDLIST"',
'query id %s' % object_name)))
+
+ if get_query_payload:
+ return request_payload
+
response = self._request("POST", self.SIMBAD_URL, data=request_payload,
timeout=self.TIMEOUT, cache=cache)
- return response.text
+
+ return response
def _get_query_header(self, get_raw=False):
votable_fields = ','.join(self.get_votable_fields())
