강의

멘토링

커뮤니티

Inflearn Community Q&A

oykang's profile image
oykang

asked

[Renewed] Introduction to Python Backend and Web Technologies for Beginners (Intermediate Python, Understanding Backend and Web Technology Basics with Flask) [Full Stack Part1-1]

Understanding Web Technologies for Understanding Rest API: GET Method and URL (Update)

request.args.get 실행중 에러

Written on

·

368

0

http http://localhost:8080/login?user_name=dave&pw=11211&email_address=oykang@gmail.com 하면 터미널 창에서 dave None None 으로 출력 됩니다. pw와 email_address 파라메타 값을 못 갖고 오는것 같습니다.  

http http://localhost:8080/login?pw=11211 실행하면 

11211이 잘 출력됩니다. 따라서 &파라메타1=파라메카1 값&파라메타2=파라메타2 값 실행에 문제가 있는것 같습니다. 문제 해결에 조언 부탁 드립니다. 

rest-apipythonflask

Answer 2

1

[윈도우사용] 저도 동일하게 윗부분의 파라미터들이 인식이 안되서, 여러가지로 해봤는데요. 우선 브라우져로는 잘 되는 걸로 봐서는 httpie 특성 같스니다. 터미널에서 httpie로 실행시에, url 앞뒤에 " " 로 묶어주니까 제대로 나오네요.

http GET "http://127.0.0.1:8080/login?user_name=dave&pw=1111&email_addr=ppp@nate.com"

 

0

funcoding님의 프로필 이미지
funcoding
Instructor

안녕하세요.

 

관련한 문법? 은 영상에서도 설명을 드렸는데요.

처음에는 ? 한다음에 변수=값 을 쓰고, 그 다음에는 &변수=값 과 같이 작성을 해야 합니다. 한번 영상을 다시 한번 참고해보시면 어떠실까요?

 

감사합니다.

oykang's profile image
oykang

asked

Ask a question