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

Command icon 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

arkepp created an issue. See original summary.

arkepp’s picture

Issue summary: View changes

brianperry made their first commit to this issue’s fork.

brianperry’s picture

Status: Active » Fixed

Addressed both the docs issue and the reported case with the baseUrl. Thanks for reporting!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.