Skip to content

Make it possible to access base URL as resource by omitting path#35

Open
thekid wants to merge 3 commits intomasterfrom
refactor/path-base
Open

Make it possible to access base URL as resource by omitting path#35
thekid wants to merge 3 commits intomasterfrom
refactor/path-base

Conversation

@thekid
Copy link
Member

@thekid thekid commented Jan 19, 2026

The following posts directly to /v1/users:

use webservices\rest\Endpoint;

$api= new Endpoint('https://api.example.com/v1/users');
$result= $api->resource()->post(['name' => 'Test'], 'application/json');

⚠️ This change makes it necessary to pass a trailing / to be able to use relative resources!

@thekid thekid added the enhancement New feature or request label Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments