패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.1

curl_logger_dio_interceptor

터미널에서 HTTP 요청을 curl 명령어로 출력하세요. 동료들과 쉽게 공유하고 Postman에 가져올 수 있습니다!

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
3.9만
좋아요
41
Pub 점수
150

패키지 설치

flutter pub add curl_logger_dio_interceptor

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

curl_logger_dio_interceptor 패키지는 Dart용 인기 있는 HTTP 클라이언트인 Dio를 강화하여 터미널에 각 HTTP 요청에 해당하는 curl 명령어를 로깅합니다. 이로 인해 개발자는 API 호출을 쉽게 확인하고 동료와 공유하거나 Postman과 같은 도구에 직접 가져올 수 있습니다. 기존의 Dio 설정과 원활하게 통합되며 Android, iOS, Web, macOS, Windows, Linux 등 모든 주요 플랫폼을 지원합니다. HTTP 트래픽을 신속하게 검사해야 하는 개발 및 협업 워크플로우에 이상적입니다.

사용 사례

  • API 요청 디버깅
  • 팀원들과 요청 공유하기
  • Postman에 requests 가져오기
  • 터미널에서 엔드포인트 테스트하기
  • 개발 중 HTTP 트래픽 모니터링

주요 기능

  • HTTP 요청을 curl 명령어로 로그 기록
  • Dio와의 원활한 통합
  • 다수의 플랫폼을 지원합니다
  • 요청 공유하기 쉬움
  • 실시간 터미널 출력

적합한 대상

  • Dio를 사용하는 Dart 개발자
  • API 작업에 협력하는 팀
  • 프론트엔드 및 백엔드 개발자
  • CI/CD 파이프라인 디버깅
  • 빠른 API 테스트

고려 사항

  • 생산 환경 사용을 위한 것이 아님
  • 조심하지 않게 사용하면 민감한 데이터가 노출될 수 있습니다
  • Dio에서 수동으로 활성화해야 합니다
  • HTTP 요청 로깅만 제한
  • 응답 로깅이 포함되지 않음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

curl_logger_dio_interceptor

pub package

A Flutter curl-command generator for Dio.

curl_logger_dio_interceptor log output

Easily test your Flutter-made requests in your favorite terminal or even in Postman or Insomnia.

Why?

Sometimes you want to replay the HTTP requests made in your app, or you want to share it with your beloved backend developer. Or you just love CURL.

Use your app as you want, and when the broken-request comes, look at your terminal, copy and paste it, and enjoy replaying it easily!

Features

  • Simple GET/POST/DELETE/PUT requests logging
  • With data when available
  • Postman-ready

Getting Started

_dio = Dio();

_dio.interceptors.add(CurlLoggerDioInterceptor());

Depending on your needs, you can also pass printOnSuccess: true to print all requests instead of only errored ones.

By default, convertFormData is true and converts FormData to plain Map so we can get a CURL representation even while using FormData (as for file uploads).

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트