MCPcopy Index your code
hub / github.com/algorithmiaio/algorithmia-python / _postRawOutput

Method _postRawOutput

Algorithmia/algorithm.py:197–208  ·  view source on GitHub ↗
(self, input1)

Source from the content-addressed store, hash-verified

195 self.client.postJsonHelper(self.url, input1, **self.query_parameters))
196
197 def _postRawOutput(self, input1):
198 # Don't parse response as json
199 self.query_parameters['output'] = 'raw'
200 response = self.client.postJsonHelper(self.url, input1, parse_response_as_json=False, **self.query_parameters)
201 # Check HTTP code and throw error as needed
202 if response.status_code == 400:
203 # Bad request
204 raise ApiError(response.text)
205 elif response.status_code == 500:
206 raise ApiInternalError(response.text)
207 else:
208 return response.text
209
210 def _postVoidOutput(self, input1):
211 self.query_parameters['output'] = 'void'

Callers 1

pipeMethod · 0.95

Calls 3

ApiErrorClass · 0.90
ApiInternalErrorClass · 0.90
postJsonHelperMethod · 0.80

Tested by

no test coverage detected