문제

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";
    }
}
도움이 되었습니까?

해결책

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";

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top