pnxtech / hydra

A light-weight library for building distributed applications such as microservices

Home Page:https://www.hydramicroservice.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hydra makeAPIRequest, queryparameters

drosi94 opened this issue · comments

Hello, i would to send an api request to one microservice using query params

hydra.makeAPIRequest(hydra.createUMFMessage({
to: 'users-service:[get]/api/users' + '?email=' + email + '&password=' + password,
from: 'authentication-service:/',
body: {}
}))
I got this error to response:

capture

@drosi94 I'll look into this - thanks for reporting!

@drosi94 When using query strings with express you need to use response.query.email and response.query.password to get at the values. Unless you define your routes this way: /api/users/:email/:password. See: http://junerockwell.com/difference-parameters-query-strings-express-js/

@drosi94 closing this issue.

Thank you very much!