--
Yoan
2010/4/6 Madireddy Samuel Vijaykumar <mad....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "ish.io" group.
> To post to this group, send an email to is...@googlegroups.com.
> To unsubscribe from this group, send email to
> ishio+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ishio?hl=en-GB.
>
here is the code http://dpaste.de/iOJQ/
Sam
On Apr 6, 11:40 am, Yoan Blanc <yoan.bl...@gmail.com> wrote:
> Can you post your code somewhere?
>
> --
> Yoan
>
> 2010/4/6 Madireddy Samuel Vijaykumar <mad.vi...@gmail.com>:
>
> > Hi,
>
> > I am trying to implement a small sample webservice. The GET method there are
> > no issues. But when i try to implement a POST. I get a 405, saying that POST
> > method is not allowed for this resource. Could someone help in this regard.
>
> > Sam
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ish.io" group.> To post to this group, send an email toi...@googlegroups.com.
(restish)sam@csslabs-laptop-xubuntu:/sandbox/restish/lib/python2.6$
grep -inHR allowed * | grep -i methods
site-packages/Paste-1.7.3-py2.6.egg/paste/fileapp.py:57:
allowed_methods = ('GET', 'HEAD')
which allows on the 'GET' and 'HEAD' method?
Sam
On Apr 6, 4:36 pm, SamG <mad.vi...@gmail.com> wrote:
> Sorry,
>
> here is the codehttp://dpaste.de/iOJQ/
>
> Sam
>
> On Apr 6, 11:40 am, Yoan Blanc <yoan.bl...@gmail.com> wrote:
>
> > Can you post your code somewhere?
>
> > --
> > Yoan
>
> > 2010/4/6 Madireddy Samuel Vijaykumar <mad.vi...@gmail.com>:
>
> > > Hi,
>
> > > I am trying to implement a small sample webservice. The GET method there are
> > > no issues. But when i try to implement a POST. I get a 405, saying that POST
> > > method is not allowed for this resource. Could someone help in this regard.
>
> > > Sam
>
> > > --
> > > You received this message because you are subscribed to the Google Groups> > "ish.io" group.> To post to this group, send an emailt...@googlegroups.com.> > To unsubscribe from this group, send email to>ishio+un...@googlegroups.com.
<html>
<head>
<title>my001</title>
</head>
<body>
<h1>my001</h1>
<p>This is the default page for the my001 project.</p>
<p>The page is called index.html and is part of your application's
package,
my001, inside the public/ directory, i.e. my001/public/
index.html.</p>
<p>Any files you add to the public directory will be served in
preference
to your application's dynamic resources.</p>
<p>When you're ready simply delete index.html and your root
resource will
be returned for this URL instead.</p>
</body>
</html>
Instead of an expected xml.
Sam
On Apr 6, 5:18 pm, SamG <mad.vi...@gmail.com> wrote:
> Well has it got something to do with this?
>
> (restish)sam@csslabs-laptop-xubuntu:/sandbox/restish/lib/python2.6$
> grep -inHR allowed * | grep -i methods
> site-packages/Paste-1.7.3-py2.6.egg/paste/fileapp.py:57:
> allowed_methods = ('GET', 'HEAD')
>
> which allows on the 'GET' and 'HEAD' method?
>
> Sam
>
> On Apr 6, 4:36 pm, SamG <mad.vi...@gmail.com> wrote:
>
> > Sorry,
>
> > here is the codehttp://dpaste.de/iOJQ/
>
> > Sam
>
> > On Apr 6, 11:40 am, Yoan Blanc <yoan.bl...@gmail.com> wrote:
>
> > > Can you post your code somewhere?
>
> > > --
> > > Yoan
>
> > > 2010/4/6 Madireddy Samuel Vijaykumar <mad.vi...@gmail.com>:
>
> > > > Hi,
>
> > > > I am trying to implement a small sample webservice. The GET method there are
> > > > no issues. But when i try to implement a POST. I get a 405, saying that POST
> > > > method is not allowed for this resource. Could someone help in this regard.
>
> > > > Sam
>
> > > > --> > > You received this message because you are subscribed to the Google Groups> > "ish.io" group.> To post to this group, send anemail...@googlegroups.com.> > To unsubscribe from this group, send email to>ishio+un...@googlegroups.com.
I create another project, my002.
And did a get on http://127.0.0.1:8080/ using firefox AddOn
RESTClient.
And i got the following as the response
<html>
<head>
<title>my002</title>
</head>
<body>
<h1>my002</h1>
<p>This is the default page for the my002 project.</p>
<p>The page is called index.html and is part of your application's
package,
my002, inside the public/ directory, i.e. my002/public/
index.html.</p>
<p>Any files you add to the public directory will be served in
preference
to your application's dynamic resources.</p>
<p>When you're ready simply delete index.html and your root
resource will
be returned for this URL instead.</p>
</body>
</html>
But the response should be the <p>Hello from my002!</p> right?
I am using retish 0.10
Sam
> > > > > --> > > You received this message because you are subscribed to the Google Groups> > "ish.io" group.> To post to this group, sendanema...@googlegroups.com.> > To unsubscribe from this group, send email to>ishio+un...@googlegroups.com.
I finally figured out that you needs to delete the index.html and
"clear the cache" from your browser.
And i got GET working but still have issues with the POST, still get a
405. I did a basic app to test this....
import logging
from restish import http, resource
import EC2
log = logging.getLogger(__name__)
class Root(resource.Resource):
@resource.POST()
def html(self, request):
return http.ok([('Content-Type', 'text/html')],
"<p>Hello from my002!</p>")
On Apr 6, 6:21 pm, SamG <mad.vi...@gmail.com> wrote:
> Well this very suprising.
>
> I create another project, my002.
>
> And did a get onhttp://127.0.0.1:8080/using firefox AddOn
> > > > > > --> > > You received this message because you are subscribed to the Google Groups> > "ish.io" group.> To post to this group,sendanema...@googlegroups.com.> > To unsubscribe from this group, send email to>ishio+un...@googlegroups.com.
this works for me (besides the double @ coming from pastie itself):
--
Yoan
2010/4/6 SamG <mad....@gmail.com>:
> To post to this group, send an email to is...@googlegroups.com.
Forgive me for this rants...
I finally figured out that you needs to delete the index.html and
"clear the cache" from your browser.
To post to this group, send an email to is...@googlegroups.com.