Skip to content

Commit 065ef9f

Browse files
committed
Fixed LCSC provider
LCSC has changed its search API, so it was broken. Fixes issue #1018
1 parent 9b17efc commit 065ef9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Services/InfoProviderSystem/Providers/LCSCProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ private function getRealDatasheetUrl(?string $url): string
123123
*/
124124
private function queryByTerm(string $term): array
125125
{
126-
$response = $this->lcscClient->request('GET', self::ENDPOINT_URL . "/search/global", [
126+
$response = $this->lcscClient->request('POST', self::ENDPOINT_URL . "/search/v2/global", [
127127
'headers' => [
128128
'Cookie' => new Cookie('currencyCode', $this->settings->currency)
129129
],
130-
'query' => [
130+
'json' => [
131131
'keyword' => $term,
132132
],
133133
]);

0 commit comments

Comments
 (0)