v1.0.4
http_auth
HTTP Basic 및 Digest 인증을 위한 Dart http 미들웨어
38좋아요 1.1만30일 다운로드160Pub 점수
AndroidiOSWebmacOSWindowsLinux
HTTP 인증(Basic/Digest)용 Dart http 미들웨어
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
An http middleware for HTTP authentication (Basic/Digest).
The method (Basic or Digest) can optionally be autodetected.
HTTP Basic authentication:
import 'package:http_auth/http_auth.dart';
main() async {
var client = http_auth.BasicAuthClient('user', 'passwd');
var response = client.get('http://httpbin.org/basic-auth/user/passwd');
}
HTTP Digest authentication:
import 'package:http_auth/http_auth.dart';
main() async {
var client = http_auth.DigestAuthClient('user', 'passwd');
var response = client.get('http://httpbin.org/digest-auth/auth/user/passwd');
}
Automatic detection of the protocol (Basic or Digest):
import 'package:http_auth/http_auth.dart';
main() async {
var client = http_auth.NegotiateAuthClient('user', 'passwd');
var response = client.get('http://httpbin.org/digest-auth/auth/user/passwd');
}
Synchronous usage is also possible (see the example).