PHP code example of cloudpack / rorschach

1. Go to this page and download the library: Download cloudpack/rorschach library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cloudpack / rorschach example snippets


$ tree .
.
├── README.md
├── composer.json
├── composer.lock
├── plugins
│   └── test_function.php
├── tests
│   ├── test-beta.yml
....

$ cat plugins/test_function.php

/**
 * toTest()
 * @Param $Response
 */
function toTest($Response) {
    return json_decode((string)$Response->getBody(), true);
}

$ cat ./tests/test-beta.yml
....
pre-request:
  -
    url: /login
    method: POST
    option:
      headers:
        ...
      json:
        ...
    bind:
      api-token: test
    after-function: toTest
...