3.77Setting the SOAP Request Header (WebService)

Created on Aug 17, 2026~1 min read

When calling a Web service based on the SOAP protocol, you usually need to specify SOAPAction in the request headers so that the server can identify the operation to be performed. Use the SetSOAPAction method to quickly set this header.

cs
HttpRequestBuilder.Get("http://your-host-address/Share/DatabaseManager.asmx")    .SetSOAPAction("http://tempuri.org/GetDatabaseList");// Automatically wrap the SOAPAction value in double quotes (per the SOAP 1.1 specification recommendation)HttpRequestBuilder.Get("http://your-host-address/Share/DatabaseManager.asmx")    .SetSOAPAction("http://tempuri.org/GetDatabaseList", addQuotes: true);