Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in simple post request #55

Closed
Rafi993 opened this issue Sep 9, 2016 · 4 comments
Closed

error in simple post request #55

Rafi993 opened this issue Sep 9, 2016 · 4 comments

Comments

@Rafi993
Copy link

Rafi993 commented Sep 9, 2016

When I give simple post request I have the following error

{
  "errno": 404,
  "errmsg": "/Foo not found because of TypeError \"not indexable\" on call.py:278"
}

my controller is as follows

class Foo(Controller,CorsMixin):
    def GET(self): pass
    def POST(self,**params):
        return "bang"

@Rafi993
Copy link
Author

Rafi993 commented Sep 9, 2016

the above route works when I did curl for that route inside aws outside aws but post request from postman did not work

@Jaymon
Copy link
Owner

Jaymon commented Sep 15, 2016

What is the output from doing the POST in curl:

$ curl -v http://HOST:LISTEN_IP/foo -d "bar=1"

And what do the server logs say?

I just copied your controller contents to a controller.py file and ran the command:

$ endpoints-wsgiserver --prefix=controller --host localhost:8000

and then ran:

$ curl http://localhost:8000/foo -d "bar=1"
"bang"

Which is the correct response, so it seems to be working for me using version 1.1.17.

@Rafi993
Copy link
Author

Rafi993 commented Sep 15, 2016

the curl works . while post from postman does not respond

@Jaymon
Copy link
Owner

Jaymon commented Sep 15, 2016

My best guess is the box still isn't open to the outside world, either because of AWS security groups or Endpoints configuration, this might help to open the box up.

Some other things you can try, after you make a request on Postman, you can make sure it is received by endpoints by looking at the server logs, if endpoints doesn't receive anything then you know it is on the access side, and not the endpoint's side.

Good luck

@Jaymon Jaymon closed this as completed Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants