MCPcopy
hub / github.com/encode/starlette / send_push_promise

Method send_push_promise

starlette/requests.py:342–348  ·  starlette/requests.py::Request.send_push_promise
(self, path: str)

Source from the content-addressed store, hash-verified

340 return self._is_disconnected
341
342 async def send_push_promise(self, path: str) -> None:
343 if class="st">"http.response.push" in self.scope.get(class="st">"extensions", {}):
344 raw_headers: list[tuple[bytes, bytes]] = []
345 for name in SERVER_PUSH_HEADERS_TO_COPY:
346 for value in self.headers.getlist(name):
347 raw_headers.append((name.encode(class="st">"latin-1"), value.encode(class="st">"latin-1")))
348 await self._send({class="st">"type": class="st">"http.response.push", class="st">"path": path, class="st">"headers": raw_headers})

Callers 1

appFunction · 0.95

Calls 4

_sendMethod · 0.80
getMethod · 0.45
getlistMethod · 0.45
appendMethod · 0.45

Tested by 1

appFunction · 0.76