dart:html
庫中HttpRequest構造函數
的用法介紹如下。
用法:
HttpRequest()
適用於任何類型請求(GET、POST 等)的通用構造函數。
此調用與 open 結合使用:
var request = new HttpRequest();
request.open('GET', 'http://dartlang.org');
request.onLoad.listen((event) => print(
'Request complete ${event.target.reponseText}'));
request.send();
是(更詳細的)等價於
HttpRequest.getString('http://dartlang.org').then(
(result) => print('Request complete: $result'));
相關用法
- Dart HttpRequest.postFormData用法及代碼示例
- Dart HttpRequest.request用法及代碼示例
- Dart HttpRequest用法及代碼示例
- Dart HttpRequest.getString用法及代碼示例
- Dart HttpResponse用法及代碼示例
- Dart HttpOverrides用法及代碼示例
- Dart HttpClient.findProxy用法及代碼示例
- Dart HttpClientRequest用法及代碼示例
- Dart HttpServer.defaultResponseHeaders用法及代碼示例
- Dart HttpClient用法及代碼示例
- Dart HttpClient.findProxyFromEnvironment用法及代碼示例
- Dart HttpClientResponse用法及代碼示例
- Dart HttpDate.parse用法及代碼示例
- Dart HttpClient.connectionFactory用法及代碼示例
- Dart HttpClientRequest.followRedirects用法及代碼示例
- Dart HttpHeaders用法及代碼示例
- Dart HttpClient.keyLog用法及代碼示例
- Dart HttpServer用法及代碼示例
- Dart HttpClientRequest.abort用法及代碼示例
- Dart HtmlCollection.last用法及代碼示例
- Dart HtmlEscape用法及代碼示例
- Dart HtmlEscapeMode用法及代碼示例
- Dart HtmlCollection.elementAt用法及代碼示例
- Dart HtmlCollection.length用法及代碼示例
- Dart HtmlDocument.registerElement2用法及代碼示例
注:本文由純淨天空篩選整理自dart.dev大神的英文原創作品 HttpRequest constructor。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。