0

I have some api, which uses methods and attributes of twisted request (twisted.web.server.Request), but in autobahn I have another form of request in onConnect method. How is it possible to handle twisted's request inside of autobahn handler?

yavalvas
  • 330
  • 2
  • 17
  • Sorry, it's unclear to me what you are asking. `twisted.web.server.Request` is for Twisted Web (HTTP). `onConnect` is unrelated, since it's for the opening WebSocket handshake. – oberstet Aug 05 '14 at 08:22
  • What uuid? There is no uuid neither in Twisted Web nor Autobahn. – oberstet Aug 05 '14 at 10:05
  • But it's able to find uuid of current session by request.headers["cookie"].split("=")[1]. It's equivalent to request.getSession().uuid for twisted. And I need to get such object as twisted's request, or make imitation of real session with existing uuid. There is any functionality, which returns utoken for the current session, that's why I'm trying to make equvalent request object. Sorry for bad previous comment. – yavalvas Aug 05 '14 at 10:09
  • 1
    Autobahn's `onConnect` provides http://autobahn.ws/python/reference/autobahn.websocket.html#autobahn.websocket.protocol.ConnectionRequest. It does not provide a `twisted.web.server.Request`. Sorry, I have no further time to ping/pong on this. – oberstet Aug 05 '14 at 10:17

0 Answers0