How can DELETE requests be made with a Dart HttpClient?

◇◆丶佛笑我妖孽 提交于 2019-12-02 04:04:28

You should be able to do with this with the open method which allows you to use any HTTP verb:

client.open('delete', 'http://example.com', '8080', '/test');

If you look at the HttpClient source you'll see that the get and post methods are just aliases for open anyway:

Future<HttpClientRequest> post(String host,
                                 int port,
                                 String path) {
    return open("post", host, port, path);
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!