본문 바로가기

Daily Develope

검색하기
Daily Develope
프로필사진 noggame

  • 분류 전체보기 (109)
    • Develope (53)
      • Python (31)
      • Web (18)
      • ETC (4)
    • AI (16)
    • DB (6)
    • MicroService (7)
      • Docker (6)
      • Kubernetes (1)
    • OS (15)
      • Linux (10)
      • Windows (1)
      • Mac (4)
    • Git (7)
    • Algorithm (1)
    • Favorite (1)
      • 책갈피 (1)
      • Music (0)
Guestbook
Notice
  • migration 중입니다...
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
  • Container
  • pandas
  • Converting
  • numpy
  • pytorch
  • Laravel
  • Mac
  • GitLab
  • CUDA
  • git
  • Windows
  • LLM
  • Paper
  • PostgreSQL
  • TORCH
  • evaluation
  • Linux
  • file
  • judge
  • Flask
  • Package
  • KAKAO
  • DB
  • docker
  • format
  • Python
  • enV
  • AI
  • list
  • Database
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록multipart (1)

Daily Develope

[Web] Multipart/form-data 요청(Request) in Python

"requests" 모듈을 사용하는 경우 Content-Type을 명시 혹은 생략하는 2가지 방법이있다. 만약 호출하려는 api 에서 Content-Type(~Header)을 검사하는 경우라면 전자(Content-Type 명시)의 방법을, 아니라면 후자의 방법을 사용하면된다. 방법1) Content-Type 명시 : Header에서 Content-Type으로 MultipartEncoder로 생성해 boundary가 추가된 content-type을 받아 사용한다. (pre-cond. requests_toolbelt 설치) import requests from requests_toolbelt import MultipartEncoder _data = MultipartEncoder(fields=[("tfile"..

Develope/Web 2023. 3. 27. 07:44
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바