01/02
2018
Wallogit.com
2017 © Pedro Peláez
client of micro service
UnionDrug微服务
MicroService客户端consumer。, (*1)
7.1+
3.2+
delete(string, string, array, array)get(string, string, array)head(string, string, array)options(string, string, array, array)patch(string, string, array, array)post(string, string, array, array)put(string, string, array, array)withError(string, int)withList(array)withObject(array)withPaging(array, ResponsePaging)withSuccess()public function postAction(){
$name = 'serviceName';
$route = 'route/action';
$query = ["page" => 1];
$body = ["userId" => 1, "options" => ["key" => "value"]];
$this->serviceClient->post($name, $route, $query, $body);
}
Directory, (*2)
└── vendor
└── uniondrug
└── service-client
├── src
│ └── Client.php
└── README.md
Composer, (*3)
{
"autoload" : {
"psr-4" : {
"UniondrugServiceClient\\" : "vendor/uniondrug/service-client/src"
}
}
}