Ngonversi Perintah CURL menyang kode Dart Online

Curl command

Examples: GET - POST - JSON - Basic Auth - Files - Form

CURL kanggo Dart Online

Alat iki mbantu sampeyan ngasilake kode Dart adhedhasar CURL Command. Salin lan Tempel CURL Command lan Generate Dart.

Apa sampeyan bisa nindakake karo CURL to Dart Converter Online?

  • CURL to Dart minangka alat sing unik banget kanggo ngowahi perintah cURL dadi panyuwunan http saka Dart. Input diwenehake dening pangguna cURL printah kanggo generate Dart Code.
  • Alat iki ngirit wektu lan mbantu nggawe kode Dart kanthi gampang.
  • CURL to Dart bisa digunakake kanthi apik ing Windows, MAC, Linux, Chrome, Firefox, Edge, lan Safari.

apa iku CURL?

cURL minangka alat baris perintah open-source sing ndownload file saka web. Ndhukung macem-macem protokol, kalebu HTTP, HTTPS, FTP, SFTP, TFTP, Gopher lan liya-liyane.

Kepiye cara ngowahi CURL dadi kode Dart? 

Step1: Tempel lan ngowahi panjalukan CURL menyang kode Dart.
Langkah 2: Nyalin Kode Dart

Convert CURL kanggo Dart Conto

KULIT
cURL example.com
Kode Dart
import 'package:http/http.dart' as http;

void main() async {
  var url = Uri.parse('http://example.com');
  var res = await http.get(url);
  if (res.statusCode != 200) throw Exception('http.get error: statusCode= ${res.statusCode}');
  print(res.body);
}