I am having issue with this
-
24-02-2021 - |
Domanda
There was an error parsing JSON data
Unexpected token < in JSON at position 0
{
"request": {"AAGAG":"FDASFA"}
}
/Vendor/CustomerApi/Api/CustomerApiInterface.php
namespace Vendor\CustomerApi\Api;
interface CustomerApiInterface
{
/**
*
* @api
*
* @param mixed $request
*
* @return void
*/
public function saveInformation($request);
}
Vendor/CustomerApi/Model/CustomerApi.php
<?php
namespace Vendor\CustomerApi\Model;
class CustomerApi implements \Vendor\CustomerApi\Api\CustomerApiInterface
{
/**
* {@inheritDoc}
*/
public function saveInformation($request)
{
return "HEELLO";
}
}
Soluzione
You need to provide some more information. But just from looking at this you may be getting an error because saveInformation
is not supposed to return a value according to the interface
, but you have the function returning "HEELLO"
;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange