verbb / consume

A Craft CMS plugin to create HTTP requests in your Twig templates to consume JSON, XML or CSV content.
Other
4 stars 1 forks source link

Client provider URL adds a trailing slash #5

Closed ammonhaggerty closed 7 months ago

ammonhaggerty commented 7 months ago

Describe the bug

Some APIs have a URL with no trailing slash (e.g., https://api.openai.com/v1/chat/completions). When the client is referenced the trailing slash is added, which results in a 404 in the case of OpenAI.

Steps to reproduce

  1. Add generic Credential client
  2. Add a URL without a trailing slash
  3. Reference the client in a 'consume.fetchData' call

Craft CMS version

4.5.11.1

Plugin version

1.0.4

Multi-site?

No response

Additional context

No response

engram-design commented 7 months ago

Fixed in Auth 1.0.12