I asked recently if there was a way to do a POST through Seaside but didn't get an answer.
I have worked at it and got it going but I am confused abut a few things. My Web Page that is the target for the POST is subclassed from WAComponent. I have two issue that I have had to deal with. The first is that processing of the POST incoming data requires two instance variables to exist - seasideMimeDocument seasideMimeDocumentType I had to add these to my top level class and then everything seemed OK except that the data was missing. In the WARequest object there is a variable called postFields so someone had foreseen the need for handling a POST but this field is empty. There is a field in the headers called content_type and for now I have replaced the more usual "application/json" with my json data and I can get it from there. Can anyone give me a clue what I can do to fix this? David -------------------------------------------------- Message sent using Winmail Mail Server _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
David
Totally Objects Doing Smalltalk since 1989 |
Hi David, I'm not sure I understand your question. Maybe if you posted more detail about what you are trying to do. Have you read this: All the best, Ron Teitelbaum On Mon, Mar 13, 2017 at 6:21 PM David Pennington <[hidden email]> wrote: I asked recently if there was a way to do a POST through Seaside but didn't get an answer. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Long Haired David
I am sorry but I can't see any directions here, just some bullet points on a slideshow. --------- Original Message --------- From: "[hidden email]" <[hidden email]> To: "David Pennington" <[hidden email]>, "Seaside - general discussion" <[hidden email]> Subject: Re: [Seaside] Http POST problems Date: 03/13/2017 22:35:05 (Mon) For POST, there is the WARestComponentFilter So you can expose a REST endpoint. Phil On Mon, Mar 13, 2017 at 11:21 PM, David Pennington <[hidden email]> wrote: I asked recently if there was a way to do a POST through Seaside but didn't get an answer. Message sent using Winmail Mail Server _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
David
Totally Objects Doing Smalltalk since 1989 |
David,
What exactly are you trying to do ? What is the context ? Do you want to build a REST interface ? https://en.wikipedia.org/wiki/Representational_state_transfer If so, the Seaside REST package are one answer. But you don't need Seaside as such, there are lower level solutions too. Or do you want to 'drive' a Seaside app, like in a test scenario ? For that, there are solutions too. Sven > On 14 Mar 2017, at 11:05, David Pennington <[hidden email]> wrote: > > > I am sorry but I can't see any directions here, just some bullet points on a slideshow. > > David > > --------- Original Message --------- > From: "[hidden email]" <[hidden email]> > To: "David Pennington" <[hidden email]>, "Seaside - general discussion" <[hidden email]> > Subject: Re: [Seaside] Http POST problems > Date: 03/13/2017 22:35:05 (Mon) > > For POST, there is the WARestComponentFilter > > http://esug.org/data/ESUG2014/4%20thursday/1400-1530%20Seaside/AdvancedSeasideMarschall.pdf > > So you can expose a REST endpoint. > > Phil > > On Mon, Mar 13, 2017 at 11:21 PM, David Pennington <[hidden email]> wrote: > I asked recently if there was a way to do a POST through Seaside but didn't get an answer. > > I have worked at it and got it going but I am confused abut a few things. My Web Page that is the target for the POST is subclassed from WAComponent. I have two issue that I have had to deal with. > > The first is that processing of the POST incoming data requires two instance variables to exist - seasideMimeDocument > seasideMimeDocumentType > > I had to add these to my top level class and then everything seemed OK except that the data was missing. > > In the WARequest object there is a variable called postFields so someone had foreseen the need for handling a POST but this field is empty. > > There is a field in the headers called content_type and for now I have replaced the more usual "application/json" with my json data and I can get it from there. > > Can anyone give me a clue what I can do to fix this? > > David > > -------------------------------------------------- > Message sent using Winmail Mail Server > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > Message sent using Winmail Mail Server > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |