Explain POST request body/json in service description documentation

Created on 15 January 2024, 5 months ago
Updated 30 January 2024, 5 months ago

Problem/Motivation

I have a very simple use case but can't get it to work with Drupal and this module (stable or dev release) and I can't understand why, nor I know how to debug / find the problem, could you please help? 🙏🏻

Steps to reproduce

Install the attached custom module, which just defines 1 service and 1 resource with 2 operations that exactly correspond to 2 RPCs ("receivable" and "account_balance") documented at https://rpc.nano.to/#receivable
Go to /admin/config/services/http-client-manager/nano_services/ and configure the requests (defaults are ok)
Try to execute them and see that the "account_balance" one will return an empty response (and no errors I can see), while the "receivable" one will return 400 Error: Missing action field (not true as you can see in the Request?!)

What am I doing wrong? If I try the same requests with curl I get the expected results, so isn't this a bug of this module?

Another question I have is: why do I have to define the response model's parameters and not just get the whole json object (which I could use with an action plugin, for example with the ECA module integration to read from the private temp key/value store)?

Thank you.

📌 Task
Status

Closed: works as designed

Version

9.3

Component

Documentation

Created by

🇮🇹Italy kopeboy Mainland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024