Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected cover and images value in response #37

Open
hasnat-we opened this issue Mar 13, 2023 · 0 comments
Open

Unexpected cover and images value in response #37

hasnat-we opened this issue Mar 13, 2023 · 0 comments

Comments

@hasnat-we
Copy link

Thanks in advance for this nice plugin.

$url = 'https://http.cat/404.jpg';
$linkPreview   = new Client($url);
$parsedGeneral = $linkPreview->getPreview('general')->toArray();

Following is the response I get:

array:7 [▼
  "cover" => GuzzleHttp\Psr7\Uri {#2588 ▼
    -scheme: "https"
    -userInfo: ""
    -host: "http.cat"
    -port: null
    -path: "/404.jpg"
    -query: ""
    -fragment: ""
  }
  "images" => array:1 [▼
    0 => GuzzleHttp\Psr7\Uri {#2588 ▶}
  ]
  "title" => null
  "description" => null
  "video" => null
  "videoType" => null
  "url" => "https://http.cat/404.jpg"
]

Expected response:
cover: expected null or string, but GuzzleHttp\Psr7\Uri returned
images: expected [] empty array, but array of GuzzleHttp\Psr7\Uri returned

Can we expect expected data type? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant