Hello,
I use Symfony Shopware app bundle. My frontend is written in react and I use axios to reach my app backend.
When I perform GET request to my backend within url below everything is working fine:
However when I add my custom param to send to my backend server I receive „Sygnature not valid“
My backend route code is below:
#[Route('/api/products', name: 'app_api_products')]
public function apiProducts( ModuleAction $module): Response
{
$simpleClient = $this->clientFactory->createSimpleClient($module->shop);
$response = $simpleClient->get($module->shop->getShopUrl().'/api/product', [
'page' => 0,
'limit' => 0,
'fields' => ["id, name, description"]
]);
$response->getHeader('Content-Type'); // application/json
$response->ok(); // true when 200 <= status code < 300
try {
$body = $response->json(); // json decoded body
} catch (\Exception $e) {
var_dump($response->getRawResponse());
}
return new JsonResponse($response->json());
}
Generally my request schema is following:
React App -----> My Shopware app backend ----->(my Shopware app backend communicates with Shopware API to get some data) Shopware API ------> Finally my Shopware app backend gives response to the fronted.
Is it possible to achieve it ?