Inspecting my GET requests, I actually see my JOIN command is failing for the URL:
http://32.ape.myapp:6969/2/?[{%22cmd%22:%22JOIN%22,%22chl%22:4,%22params%22:{%22channel%22:%22messages-8486bd4e-ddb5-11e0-9f35-0026bb1b90cc%22},%22sessid%22:%221f8a49e30c8bce0d4091c674ef2e91a0%22}] with response: Ape.transport.read('[{"time":"1316109674","raw":"ERR","data":{"chl": 4,"code":"001","value":"BAD_PARAMS"}}]') All the examples about join shows all it takes is the channel name. What other parameters am I missing? Chris On Sep 15, 12:08 pm, Cerin <[email protected]> wrote: > I'm attempting to send a message to a specific channel from a Python > script. > > I pretty sure my client JS is correct, as there are no errors and I've > confirmed the ready event fires. > > On the client, I call: > > channel = "messages-8486bd4e-ddb5-11e0-9f35-0026bb1b90cc"; > client.core.join(channel); > client.onRaw('postmsg', function(raw, pipe) { > console.log('postmsg'+raw); > > }); > > And in my Python script, (based > onhttp://www.alittletothewright.com/index.php/2010/01/comet-with-django...), > I use urllib2 to call the url: > > cmd = [{'cmd': 'inlinepush', > 'params': { > 'password': settings.APE_PASSWORD, > 'raw': 'postmsg', > 'channel': "messages-8486bd4e-ddb5-11e0-9f35-0026bb1b90cc", > 'data': { > 'text': message, > #'posted_by': new_msg.posted_by, > #'timestamp': new_msg.timestamp > } > }}] > > url = settings.APE_SERVER + urllib2.quote(json.dumps(cmd)) > print url > response = urllib2.urlopen(url) > print response.read() > > The url displayed is: > > http://ape.myapp:6969/?%5B%7B%22cmd%22%3A%20%22inlinepush%22%2C%20%22... > > However, the response read is: > > [{"time":"1316102497","raw":"ERR","data": > {"code":"401","value":"UNKNOWN_CHANNEL"}}] > > If I'm successfully joining the channel on the client side, why is the > server telling the Python script that the channel doesn't exist? > > Thanks, > Chris -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
