-
Notifications
You must be signed in to change notification settings - Fork 0
2.3. beast template
Joaquim Rocha edited this page May 30, 2020
·
4 revisions
The template command functions as a utility to generate request files.
Usage
beast template [-m <http method>] [url] <templateFile>
-
http method
HTTP method to use on the request, defaults to GET
-
url
Endpoint to test
-
templateFile
Name of the file to be created with the request template, if the file's extension is ".json" the template is created as JSON file, otherwise, a YAML file will be created.
Use Cases
Can be used to generate an "empty" request template:
$ beast template test.yaml
File test.yaml was created, please edit before use
$ cat test.yaml
method: 'Use Http method: GET/POST/PUT/DELETE'
endpoint: Http URL to be invoked
headers:
User-Agent: Beast/1
request-body: Optional, enter body to send with POST or PUT
Or, to generate the base request, that you can customize, adding headers or payload:
$ beast template https://github.com/jjmrocha/beast test.yaml
File test.yaml was created for 'GET https://github.com/jjmrocha/beast'
$ cat test.yaml
method: GET
endpoint: https://github.com/jjmrocha/beast
headers:
User-Agent: Beast/1
You can get more information here