구현
POSTMAN
• Postman Website는 localhost에 요청할 수 없음 → Postman Desktop을 깔아야 함 (관련 에러 참고)
// 에러 메시지
Could not send request
Cloud Agent Error: Can not send requests to localhost. Select a different agent.
• 서버 실행 명령어(터미널에 입력)
python.exe -m uvicorn main:app --reload
+) FastAPI 오류
// 에러 메시지
Error loading ASGI app. Could not import module "api"
→ 디렉토리를 FastAPI로 바꾸어야 함
→ vsCode 터미널에 cd 'FastAPI의 경로' 명령어 작성

• 터미널을 사용한 git push(터미널에 입력)
// MDS-74 브랜치를 원격에 올리는 예제
git push origin MDS-74
서버로 이미지 전송
에러가 난다면 contentType 지정
final request = http.MultipartRequest(
'POST',
Uri.parse('http://34.64.96.217:8000/guide/'),
);
request.files.add(
await http.MultipartFile.fromPath(
'file',
captureImage.path,
contentType: MediaType('image', 'png'),
),
);
final response = await http.Response.fromStream(await request.send());