Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

target_http

Marcel Kloubert edited this page Dec 13, 2016 · 26 revisions

Home >> Targets >> http

HTTP

Deploys to a HTTP server/service.

{
    "deploy": {
        "targets": [
            {
                "type": "http",
                "name": "My HTTP service",
                "description": "A HTTP service on a HTTP server, e.g.",

                "url": "https://host.example.com/webdav/?file=${VSDeploy-File}",
                "method": "PUT",
                "headers": {
                    "X-My-Custom-Header-File": "The file path is: ${VSDeploy-File}",
                    "X-My-Custom-Header-FileName": "The file name is: ${VSDeploy-File-Name}",
                    "X-My-Custom-Header-FileSize": "The file size is: ${VSDeploy-File-Size}",
                },
                "submitContentLength": true,
                "submitFileHeader": true
            }
        ]
    }
}
Name Description
headers The optional list of additional request headers to send.
method The HTTP method to use. Default PUT
submitContentType Submit the Content-type request header or not. Default: (true)
submitContentLength Submit the Content-length request header or not. Default: (true)
submitDate Submit the Date request header or not. Default: (true)
submitFileHeader Submit the X-vsdeploy-file request header that contains the path of the file that is submitted. Default: (false)
url The request URL.

Placeholders

As you in the setting example, headers and url can use placeholders:

Name Description Description
VSDeploy-Date The submission (not the file) date. Sun, 23 sep 1979 05:09:00 GMT
VSDeploy-File The path of the file that is submitted. /the/path/of/the/file.txt
VSDeploy-File-Mime The mime/content type of the file that is submitted. text/plain
VSDeploy-File-Name The name of the file that is submitted. file.txt
VSDeploy-File-Size The size of the file that is submitted. 5979

All placeholders are case insensitive.

Clone this wiki locally