Fetch - Customized

Fetch 允許你全權控制並決定該怎麼發送 HTTP Request

Call Web Service (SOAP 1.1)

假設有一個 Web Service 提供上傳檔案的功能,要求的格式如下

SOAP 1.1 /Uploading.asmx?op=UploadFiles

POST /Uploading.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/UploadFiles"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <UploadFiles xmlns="http://tempuri.org/">
      <fs>base64Binary</fs>
      <fileName>string</fileName>
    </UploadFiles>
  </soap:Body>
</soap:Envelope>

Custom Fetch

輸出:

Last updated

Was this helpful?