Valid TaskActions are:

GetResponse (Required: Url Optional: ContentType, Timeout, SkipSslCertificateValidation, Retries, RetryInterval, UseIntegratedAuthentication Output: Response, Status)

Post (Required: Url Optional: ContentType, Timeout, RequestContent, SkipSslCertificateValidation, Retries, RetryInterval, UseIntegratedAuthentication Output: Response, Status)

Remote Execution Support: NA

Namespace: MSBuild.ExtensionPack.Web
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 3.5.0.0

Examples

Xml Copy imageCopy
<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath>
        <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath>
    </PropertyGroup>
    <Import Project="$(TPath)"/>
    <Target Name="Default">
        <MSBuild.ExtensionPack.Web.HttpWebRequest TaskAction="GetResponse" Url="http://www.freetodev.com">
            <Output TaskParameter="Response" ItemName="ResponseDetail"/>
            <Output TaskParameter="Status" PropertyName="ResponseStatus"/>
        </MSBuild.ExtensionPack.Web.HttpWebRequest>
        <Message Text="Status: $(ResponseStatus)"/>
        <Message Text="StatusDescription: %(ResponseDetail.StatusDescription)"/>
        <Message Text="StatusCode: %(ResponseDetail.StatusCode)"/>
        <Message Text="CharacterSet: %(ResponseDetail.CharacterSet)"/>
        <Message Text="ProtocolVersion: %(ResponseDetail.ProtocolVersion)"/>
        <Message Text="ResponseUri: %(ResponseDetail.ResponseUri)"/>
        <Message Text="Server: %(ResponseDetail.Server)"/>
        <Message Text="ResponseText: %(ResponseDetail.ResponseText)"/>        
    </Target>
</Project>

Inheritance Hierarchy

System..::..Object
  Microsoft.Build.Utilities..::..Task
    MSBuild.ExtensionPack..::..BaseTask
      MSBuild.ExtensionPack.Web..::..HttpWebRequest

See Also