namespace \webfiori\http
class WebServicesManager
Class Attributes Summary
Class Methods Summary
Class Attributes Details
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
Class Methods Details
- api-info
- request-info
Parameters:
- string $version initial API version. Default is '1.0.0' Version number must follow the format 'X.X.X' where 'X' is a number between 0 and 9 inclusive.
Parameters:
- AbstractWebService $service The web service that will be added.
{
"message":"Content type not supported.",
"type":"error",
"request-content-type":"content_type"
}
Parameters:
- string $cType The value of the header 'content-type' taken from request header.
{
"message":"Database Error",
"type":"error",
"err-info":OTHER_DATA
}
Parameters:
Parameters:
- string $serviceName The name of the service.
{
"message":"The following parameter(s) has invalid values: 'param_1', 'param_2', 'param_n'",
"type":"error"
}
{
"message":"The following required parameter(s) where missing from the request body: 'param_1', 'param_2', 'param_n'",
"type":"error",
}
{
"message":"Service name is not set.",
"type":"error"
}
{
"message":"Not authorized",
"type":"error"
}
Parameters:
- string $name The name of the service.
{
"message":"Method Not Allowed.",
"type":"error",
}
Parameters:
Parameters:
- array $headersArr An associative array. The keys will act as the headers names and the value of each key will represents the value of the header.
{
"message":"Action is not set.",
"type":"error"
"http-code":404
"more-info":EXTRA_INFO
}
Parameters:
- string $message The message to send back.
- string $type A string that tells the client what is the type of the message. The developer can specify his own message types such as 'debug', 'info' or any string. If it is empty string, it will be not included in response payload.
- int $code Response code (such as 404 or 200). Default is 200.
- mixed $otherInfo Any other data to send back it can be a simple string, an object... . If null is given, the parameter 'more-info' will be not included in response. Default is empty string. Default is null.
{
"message":"Service not implemented.",
"type":"error",
}
{
"message":"Action not supported",
"type":"error"
}
Parameters:
- sting $desc Set description. Used to help front-end to identify the use of the services set.
Parameters:
Parameters: