ScottyLabs / HackerHelp

TartanHacks 2017 mentor request and dispatch system
1 stars 0 forks source link

Working with Flask requests #24

Closed keoliva closed 7 years ago

keoliva commented 7 years ago

Hacker name(s): Kayla Physical location: Operating system(s): Programming Langugage: python

I get an Internal Server Error. "The server encountered an internal error and was unable to complete your request." I'm trying to use the ScottyLabs director api, and make a simple GET request.

Pls halp!

lmwnshn commented 7 years ago

Example code request? You should be able to get https://apis.scottylabs.org/directory/v1/andrewID/odb

keoliva commented 7 years ago

Right. I just don't know how to do the request with Flask.request. What I'm doing now times out: request = request.get('https://apis.scottylabs.org/directory/v1/andrewID/' + andrewID)

dsyang commented 7 years ago

Kayla where can I find you to help?

lmwnshn commented 7 years ago

What is the type of request? It looks like you're using the requests library, in which case it would be requests.get(...) to begin with? Your code otherwise looks fine.

keoliva commented 7 years ago

It's a GET request. I've resolved my issue!