{
    "$schema": "../../testbot.schema",
    "$kind": "Microsoft.AdaptiveDialog",
    "triggers": [
        {
            "$kind": "Microsoft.OnBeginDialog",
            "actions": [
                {
                    "$kind": "Microsoft.TextInput",
                    "prompt": "Welcome! Here is a http request sample, please enter a name for you visual pet.",
                    "property": "dialog.petname"
                },
                {
                    "$kind": "Microsoft.SendActivity",
                    "activity": "Great! Your pet's name is ${dialog.petname}"
                },
                {
                    "$kind": "Microsoft.NumberInput",
                    "prompt": "Now please enter the id of your pet, this could help you find your pet later.",
                    "property": "dialog.petid"
                },
                {
                    "$kind": "Microsoft.HttpRequest",
                    "url": "https://petstore.swagger.io/v2/pet",
                    "method": "POST",
                    "headers": {
                        "test": "test",
                        "test2": "test2"
                    },
                    "body": {
                        "id": "${dialog.petid}",
                        "category": {
                            "id": 0,
                            "name": "string"
                        },
                        "name": "=dialog.petname",
                        "photoUrls": [
                            "string"
                        ],
                        "tags": [
                            {
                                "id": 0,
                                "name": "string"
                            }
                        ],
                        "status": "available"
                    },
                    "resultProperty": "dialog.postResponse"
                },
                {
                    "$kind": "Microsoft.SendActivity",
                    "activity": "Done! You have added a pet named \"${dialog.postResponse.content.name}\" with id \"${dialog.postResponse.content.id}\""
                },
                {
                    "$kind": "Microsoft.NumberInput",
                    "prompt": "Now try to specify the id of your pet, and I will help your find it out from the store.",
                    "property": "$id2"
                },
                {
                    "$kind": "Microsoft.HttpRequest",
                    "url": "https://petstore.swagger.io/v2/pet/${$id2}",
                    "method": "GET",
                    "resultProperty": "dialog.getResponse"
                },
                {
                    "$kind": "Microsoft.SendActivity",
                    "activity": "Great! I found your pet named \"${dialog.getResponse.content.name}\""
                }
            ]
        }
    ]
}