Thanks for the honest recommendation.
Besides the custom header issue, I think there’s also something wrong about the processing of the URL used to request with
platform.api. I’m still talking about DF 2.2, and maybe both issues are related.
platform.api to request any other URL different from the one used to request to the service, I always receive an exception (
Executed command returned with error code: 1 when using a NodeJS service).
- A NodeJS service (let’s call it
myservice) receives an external request as
GET https://myapp.myserver.com/api/v2/myservice/ (with the corresponding API key and session token).
- From within the service, let’s say we issue a request to another service with an API key in the query string which has the corresponding permissions. I guess adding the API key in the URL as a query string is a workaround the header problem in server scripts. E.g:
- The problem comes when using an alias URL of the same server, such as
http://localhost:8080/api/v2/mongodb/_table/myTable?api_key=blahblah. For some reason the call to
platform.api.post() always returns an error.
I understand the latter request is considered as an external request, but it seems that the function gives an error even before sending the request out (we’ve tried listening on
¿Is this another known issue? ¿Maybe because, like in the example we tried to issue a HTTP request from an HTTPS request?