0

I'm trying to test out this POST request that I've implemented on my django web server and I ran into quite the snag...

After running the server with:

python manage.py runserver

I figured that the quickest and dirtiest way to do test out the POST is through telnet.

telnet localhost 8000

gave me

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

Then I realized that if the connection is refused, then I won't even be able to do my GET requests through my client-side. When I try to access the page through my web browser (Chrome), I GET the proper json response, and even the POST uri goes through (though with no data...)

I then tried a programmatic approach by establishing a connection with Python's urllib2 but even that gave me a connection refused exception.

I'm a complete django noob so I feel like I'm just forgetting something basic here... I will provide more server-specifications if you need.

Thanks

brianSan
  • 545
  • 6
  • 17

1 Answers1

0

I don't know if I understand you correctly but I think what you are looking for is postman, a chrome plugin to do the POST thing.

enter image description here

shellbye
  • 4,620
  • 4
  • 32
  • 44
  • Thanks for the postman suggestion. It works with GET but the POST still isn't working. I think it's related to the middleware stuff but I'm not sure... – brianSan Nov 09 '14 at 09:01
  • @brianSan when using the post method of postman, you need to chose between the 'form-date', 'x-www-form-urlencoded' and the 'raw'. You can have a try. The choose buttons is right above the 'key-value' pair. See the picture above. – shellbye Nov 10 '14 at 03:22