Skip to content

Conversation

@omitech
Copy link

@omitech omitech commented Jan 31, 2025

The LinkedIn Assets API uses the PUT method to upload image assets, but the current implementation does not support it for the following reasons:

  • The PUT method does not return any response body, making it incompatible with Client::api, which expects a response body.
  • The Method::isMethodSupported currently prohibits the PUT method.

Added Client::put($endpoint, $resource) to handle uploads:

Parameters:

  • $endpoint (string): The API endpoint where the resource will be sent.
  • $resource (resource): The data resource to be uploaded (typically a file handle).

If the provided argument is not a valid resource, it throws an InvalidArgumentException

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

Successfully merging this pull request may close these issues.

1 participant