Dočasná chyba

Příkaz temporary error je určen pro otestování dočasně chybového stavu.

K dočasné chybě dochází zpravidla ve chvílích, kdy Domain Master není schopen předat Váš požadavek patřičnému centrálnímu registru.

JSON

HTTP požadavek...

    http request:
    POST /masterapi/server.php HTTP/1.0
    Host: www.domainmaster.cz
    Content-Type: text/plain; charset=UTF-8
    Content-Length: 41
    Authorization: Basic R1I6VE9NRUs6dG90b19hc2lfbmVuaV9oZXNsbw==

    {"command":"temporary error","params":[]}

... a odpověď:

    HTTP/1.0 200 OK
    Date: Tue, 24 Sep 2013 11:52:13 GMT
    Server: Apache
    Content-Length: 121
    Connection: close
    Content-Type: text/json; charset=UTF-8

    {"status":"temporary error","message":"oops, a temporary error has occurred.... in fact this is just a testing response"}

YAML

HTTP požadavek...

    POST /masterapi/server.php HTTP/1.0
    Host: www.domainmaster.cz
    Content-Type: text/plain; charset=UTF-8
    Content-Length: 41
    Authorization: Basic R1I6VE9NRUs6dG90b19hc2lfbmVuaV9oZXNsbw==

    ---
    command: temporary error
    params: []

... a odpověď:

    HTTP/1.0 200 OK
    Date: Tue, 24 Sep 2013 11:53:20 GMT
    Server: Apache
    Content-Length: 118
    Connection: close
    Content-Type: text/plain; charset=UTF-8

    ---
    status: temporary error
    message: oops, a temporary error has occurred.... in fact this is just a testing response

PHP klient

    <?php
    $result = $client->sendCommand("temporary error");
    $result->isSuccess(); // false
    $result->isTemporaryError(); // true
    echo $result->getMessage(); // "oops, a temporary error has occurred.... in fact this is just a testing response"
    print_r($result->getData()); // null