anchor.diff:  let getAllReleasesFor server appname = 
       if String.IsNullOrEmpty(appname) then server + "/deployments/"
       else server + "/deployments/" + appname + "/"
  -    |> get (Json.deserialize<DeploymentResponse>)
  +    |> get defaultTimeout (Json.deserialize<DeploymentResponse>)
       |> wrapFailure
   
   /// Returns all releases from the given server.
   let getAllReleases server = getAllReleasesFor server null
   
   /// Posts a deployment package to the given URL.
  -let postDeploymentPackage url packageFileName args = post url packageFileName args |> wrapFailure
  +let postDeploymentPackage url packageFileName args = post url packageFileName args defaultTimeout |> wrapFailure
   
   /// Posts a deployment package to the given URL, executes the script inside it with given arguments and handles the response.
  -let DeployPackageWithArgs url packageFileName args =
  -    match postDeploymentPackage url packageFileName args with
  -    | Success _ -> tracefn "Deployment of %s successful" packageFileName
  -    | Failure exn -> failwithf "Deployment of %A failed\r\n%s" packageFileName (buildExceptionString exn)
  -    | response -> failwithf "Deployment of %A failed\r\n%A" packageFileName response
  +let deployPackage (f : Deployment -> Deployment) =
  +    let d = f { defaultDeployment with AuthToken = authToken }
  +    authToken <- d.AuthToken 
  +    let result = post d.Url d.PackageFileName (d.Arguments |> Array.ofList) d.Timeout |> wrapFailure
  +    match result with
  +    | Success _ -> tracefn "Deployment of %s successful" d.PackageFileName
  +    | Failure exn -> failwithf "Deployment of %A failed\r\n%s" d.PackageFileName (buildExceptionString exn)
  +    | response -> failwithf "Deployment of %A failed\r\n%A" d.PackageFileName response
  +
  +/// Posts a deployment package to the given URL, executes the script inside it with given arguments and handles the response.
  +/// Deprecated, use DeployPackage
  +[<Obsolete("Use deployPackage")>]
  +let DeployPackageWithArgs url packageFileName args = 
  +    deployPackage (fun x -> { x with Url = url; PackageFileName = packageFileName; Arguments = args |> List.ofArray })
   
   /// Posts a deployment package to the given URL and handles the response.
  +/// Deprecated, use DeployPackage
  +[<Obsolete("Use deployPackage")>]
   let DeployPackage url packageFileName = DeployPackageWithArgs url packageFileName [||]
   
   /// Deprecated, use DeployPackage
  
positive.code: open HttpListenerHelper
  open Fake.SshRsaModule
  
  type AuthToken = 
      | AuthToken of Guid
  
  let mutable private authToken : Guid option = None
  
  /// A http response type.
  type Response = 
  
negative.code: type Action = string
  type FilePath = string
  
  type Deployment = 
      { PackageFileName : FilePath
        Url : Url
        Timeout : TimeSpan
        Arguments : string list
        AuthToken : AuthToken option }
  
  let private defaultTimeout = TimeSpan.FromMinutes(20.)
  
  let private defaultDeployment = 
      { PackageFileName = ""
        Url = ""
        Timeout = defaultTimeout
        Arguments = []
        AuthToken = None }
  
  [<Literal>]
  let scriptArgumentsHeaderName = "X-FAKE-Script-Arguments"
  
  let private webRequest (url : Url) (action : Action) (timeout : TimeSpan) = 
      let req = WebRequest.Create url :?> HttpWebRequest
      req.Method <- action
      req.Timeout <- int timeout.TotalMilliseconds
      req.ContentType <- "application/fake"
      req.Headers.Add("fake-deploy-use-http-response-messages", "true")
      match authToken with
      | None -> ()
      | Some t -> 
          match t with
          | AuthToken t -> req.Headers.Add("AuthToken", string t)
      req
  
  let private downloadString (request : HttpWebRequest) = 
      use responseStream = request.GetRequestStream()
      use ms = new MemoryStream()
      responseStream.CopyTo ms
      Encoding.UTF8.GetString(ms.ToArray())
  
  /// Gets the http response from the given URL and runs it with the given function.
  let private get timeout f url = 
      try 
          let msg = webRequest url "GET" timeout |> downloadString
          try 
              match msg |> Json.deserialize with
              | Message msg -> 
  