如何在dart中使用HttpClient发出HTTPS请求? [英] How to make HTTPS request using HttpClient in dart?
本文介绍了如何在dart中使用HttpClient发出HTTPS请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用dart(dart:io软件包,而不是dart:http)中的HttpClient,我想发送HTTPS请求。有没有办法做到这一点?我似乎找不到能允许我这样做的方法。
I'm using HttpClient from dart (dart:io package, NOT dart:http) and I'd like to send an HTTPS request. Is there a way to do that? I can't seem to find a method that would allow me that.
推荐答案
new HttpClient().getUrl(Uri.parse('https://www.somedomain.com'));
这篇关于如何在dart中使用HttpClient发出HTTPS请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文