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:             |> Choice1Of2
      with exn -> Choice2Of2 exn
  
  let private uploadData (action : Action) (url : Url) (body : byte []) timeout = 
      let req = webRequest url action timeout
      use reqStream = req.GetRequestStream()
      reqStream.Write(body, 0, body.Length)
      use respStream = req.GetResponse().GetResponseStream()
      let ms = new MemoryStream()
      respStream.CopyTo ms
      ms.ToArray()
  
  let private uploadFile (action : Action) (url : Url) (file : FilePath) (args : string []) timeout = 
      let req = webRequest url action timeout
      req.Headers.Add(scriptArgumentsHeaderName, args |> toHeaderValue)
      req.AllowWriteStreamBuffering <- false
      use fileStream = File.OpenRead file
  