nathan-lapinski / Flask-REST-API

A Flask REST API for Ken Anderson's Data Engineering course
0 stars 0 forks source link

Heather Witte's Evaluation #7

Open hswitte opened 9 years ago

hswitte commented 9 years ago

I have never used flask before, and it seems like a really nice tool for creating web services in python. I really liked that the readme file was very comprehensive, providing me with all of the information I needed in order to get flask up and running on my machine. The source code was also very well organized and easy to understand.

I was able to get the service running, however was unable to get any of the curl commands to work (a GET request would give me an 'unauthorized access' error, and PUT would give me a 'bad request' error). It is very possible that these errors occurred because of a problem with file permissions or perhaps the flask or flask-httpauth installations on my machine.

nathan-lapinski commented 9 years ago

Hey Heather, glad to hear you liked working with Flask. As far as the unauthorized request error goes, try adding: -u planet:python in front of every curl request you issue. So your curl requests should look something like: curl -u planet:python This is because the API is using a basic form of HTTP authentication, as a security measure, so users are required to authenticate themselves with those credentials. If you were already including this in your requests, then yes, it may be an issue with how HTTPAuth is installed. For the 'bad request error' that you are seeing with PUTs, I would say that this likely has more to do with a slight syntax error in the request more than anything else server side (I ran into these errors a lot when writing the system, and it was usually a syntax problem).