Reputation: 6494
I have a need for my client(s) to send data to my app engine application that should go something like this:
I don't have much experience working with REST interfaces, but it seems that GET and POST are not entirely appropriate here. I'm assuming that the client needs to establish some kind of persistent connection with the server so they can both have a proper "conversation". My understanding is that sockets are reserved for paid apps, and I'd like to keep this on the free tier. However, I'm not sure of how to go about this. Is it the Channel API I should be using? I'm a bit confused by the documentation.
The app engine app is Python, as is the client. The solution that I'm leaning towards right now is that the client does a POST to the server (here's what I have), and subsequently does a GET (tell me what you need) and lastly does a POST (here's the data you wanted). But it seems messy.
Can anyone point me in the right direction please?
EDIT:
I didn't realize that you could get the POST response with Pythons urllib using the 'read' function of the object returned by urlopen. That makes things a lot nicer, but if anyone has any other suggestions I'd be glad to hear them.
Upvotes: 0
Views: 105
Reputation: 19835
What you suggest is the right way. 1&2 is a single post. Then you post again to the server.
Upvotes: 3