# Note: This file is meant primarily for development and testing of Slumber. It # is not intended as documentation. While it may be a helpful example, canonical # documentation is at: https://slumber.lucaspickering.me/book/ profiles: works: name: This Works default: true data: host: https://httpbin.org username: xX{{chains.username}}Xx user_guid: abc123 init-fails: name: Request Init Fails data: request-fails: name: Request Fails data: host: http://localhost:5000 username: xX{{chains.username}}Xx user_guid: abc123 chains: username: source: !command command: [whoami] trim: both password: source: !prompt message: Password sensitive: true select_value: source: !select message: Select a value options: - foo - bar - baz - a really really really really long option - "{{chains.username}}" select_dynamic: source: !select message: Select a value options: "{{chains.login_form_values}}" login_form_values: source: !request recipe: login selector: $.form[*] selector_mode: array auth_token: source: !request recipe: login trigger: !expire 12h selector: $.form image: source: !file path: ./static/slumber.png big_file: source: !file path: Cargo.lock .ignore: base: &base authentication: !bearer "{{chains.auth_token}}" headers: Accept: application/json Content-Type: application/json requests: login: !request method: POST url: "{{host}}/anything/login" authentication: !basic username: "{{username}}" password: "{{chains.password}}" query: - sudo=yes_please - fast=no_thanks - fast=actually_maybe headers: Accept: application/json body: !form_urlencoded username: "{{username}}" password: "{{chains.password}}" users: !folder name: Users requests: get_users: !request <<: *base name: Get Users method: GET url: "{{host}}/get" query: - foo=bar - select={{chains.select_dynamic}} get_user: !request <<: *base name: Get User method: GET url: "{{host}}/anything/{{user_guid}}" modify_user: !request <<: *base name: Modify User method: PUT url: "{{host}}/anything/{{user_guid}}" body: !json { "new_username": "user formerly known as {{chains.username}}", "number": 3, "bool": true, "null": null, "array": [1, 2, false, 3.3, "www.www"], } get_image: !request headers: Accept: image/png name: Get Image method: GET url: "{{host}}/image" upload_image: !request name: Upload Image method: POST url: "{{host}}/anything/image" body: !form_multipart filename: "logo.png" image: "{{chains.image}}" big_file: !request name: Big File method: POST url: "{{host}}/anything" body: !json { data: "{{chains.big_file}}" } delay: !request <<: *base name: Delay method: GET url: "{{host}}/delay/5"