Problem/Motivation
https://www.npmjs.com/package/@drupal-api-client/json-api-client
The username and password in the Basic auth example have to be wrapped in "credentials"
Not enough to file a separate issue, but also encountered when first trying to use the lib:
baseUrl has historically (in Drupal) been the full, public URL to the site, i.e. http://host/path
In that context, it is behaving in a surprising way here. I expected http://host/path to use http://host/path/jsonapi , but it goes to http://host/jsonapi
With apiPrefix set to path/jsonapi it works, but it seems to me like this should be part of the baseUrl.
Issue fork api_client-3491907
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
arkepp commentedComment #6
brianperryAddressed both the docs issue and the reported case with the baseUrl. Thanks for reporting!