【问题标题】:PUT request in DartDart 中的 PUT 请求
【发布时间】:2015-06-15 15:16:33
【问题描述】:

有人知道如何在 Dart 中发出“PUT”请求吗?

我这样做了,但我不知道如何继续:

HttpRequest request =new HttpRequest();
request.open("PUT", url);
...

谢谢。

【问题讨论】:

    标签: dart google-chrome-app put


    【解决方案1】:
    var resp = await HttpRequest.request('http://someurl.com', 
        method: 'PUT', sendData: data);
    // Do something with the response.
    

    HttpRequest.request('http://someurl.com', 
        method: 'PUT', sendData: data)
    .then((HttpRequest resp) {
      // Do something with the response.
    });
    

    【讨论】:

    猜你喜欢
    • 2020-06-25
    • 1970-01-01
    • 2012-03-07
    • 2012-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-22
    • 2021-10-11
    相关资源
    最近更新 更多