[ 작업 환경 ]
Centos 7
1. 유저 로그인 test용 curl 커맨드 예시 : POST, email='test@gmail.com', password='test'
curl -d "email=test@gmail.com&password=test" localhost:5000/login_user
2. 신규 유저 생성 test용 curl 커맨드 예시 : POST, email='test@gamil.com', name='김사자', password='testpassword'
curl -d "email=test@gmail.com&name=김사자&password=testpassword" localhost:5000/add_new_user
3. 특정한 HTTP Header 를 설정해서 보내야 할 경우(Ex: json data등) -H (–header) 옵션으로 헤더 설정 예시 커맨드
curl -d @myJson.js -H "Content-Type: application/json" http://localhost:5000/jsonEcho
4. curl Header, form-data 데이터 전송 POST 콜 예시 커맨드
curl -X POST -H "Content-Type: application/json" -d '{"password": "growpass99@@", "email": "growingsaja@example.com"}' https://37.136.178.249/auth/sign-up
'Infra > Linux' 카테고리의 다른 글
[Linux] cut, grep 으로 함께 많이 사용되는 옵션 커맨드 예시 (0) | 2020.01.29 |
---|---|
[Linux] file의 인코딩 확인 및 변환하기 (feat. file, iconv) (0) | 2020.01.20 |
[Linux] zip, unzip 커맨드에 대하여 (0) | 2020.01.18 |
[Centos] Timezone KST (Korea Seoul)로 변경하기 & soft/hardware적 time 동기화 (0) | 2020.01.17 |
[Solved][Centos7] WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. (0) | 2020.01.09 |