8000 Unexpected cover and images value in response · Issue #37 · dusterio/link-preview · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unexpected cover and images value in response #37
Open
@hasnat-we

Description

@hasnat-we

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0