MCPcopy Index your code
hub / github.com/StackStorm/st2 / _response_hook

Method _response_hook

st2client/st2client/utils/httpclient.py:167–178  ·  view source on GitHub ↗
(self, response)

Source from the content-addressed store, hash-verified

165 return response
166
167 def _response_hook(self, response):
168 if self.debug:
169 # Log cURL request line
170 curl_line = self._get_curl_line_for_request(request=response.request)
171 print("# -------- begin %d request ----------" % id(self))
172 print(curl_line)
173 print("# -------- begin %d response ----------" % (id(self)))
174 print(response.text)
175 print("# -------- end %d response ------------" % (id(self)))
176 print("")
177
178 return response
179
180 def _get_curl_line_for_request(self, request):
181 parts = ["curl"]

Callers 6

getMethod · 0.95
postMethod · 0.95
post_rawMethod · 0.95
putMethod · 0.95
patchMethod · 0.95
deleteMethod · 0.95

Calls 1

Tested by

no test coverage detected