- Issue created by @brianperry
- πΊπΈUnited States grasmash
Yes! Is there any way to achieve this in the meantime? Iβm interested in making authenticated requests to a Drupal site to non-JSON API endpoints with various methods.
- πΊπΈUnited States brianperry
> Is there any way to achieve this in the meantime? Iβm interested in making authenticated requests to a Drupal site to non-JSON API endpoints with various methods.
This issue was written with the json-api-client in mind, so how practical this is might depend a bit on what type of non JSON:API endpoints you mean here. Would love to hear some more details about your use case. But we did structure this project in such a way to make it possible to support more than just JSON:API.
If routing is really what you need and decoupled-router makes sense in your case, our decoupled-router-client is a standalone package: NPM / Docs
The base API client is also distributed as a package. You can extend this class to get things like our authentication methods, caching, and so on. So if what you're really looking for is a jump start to work with a completely different API type, this could help. NPM / Docs
Some other possibilities that don't yet exist, but have been discussed:
Super early, but we've started work on a GraphQL client. This will support mutations β which would address this use case.
There has also been discussion about the idea of creating a client for JSON-RPC β .
So yeah, a number of possibilities, but would love to hear more about what you are looking to do.
- πΊπΈUnited States brianperry
Additional discussion in slack: https://drupal.slack.com/archives/C05BP6659U0/p1723227683199179
which spawned a few issues:
https://www.drupal.org/project/api_client/issues/3467667 β
https://www.drupal.org/project/api_client/issues/3467668 β