Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter not read #92

Closed
koswarabilly opened this issue Nov 6, 2017 · 8 comments
Closed

Parameter not read #92

koswarabilly opened this issue Nov 6, 2017 · 8 comments
Labels

Comments

@koswarabilly
Copy link

koswarabilly commented Nov 6, 2017

from my last issue which is content-type have been fixed #89 ,but come new problem which is parameter
i want to put some parameter when i try to get respond from certain url

screenshot from 2017-11-06 15-08-05

when i try to execute this come out as error

screenshot from 2017-11-06 15-11-23

is it the right format to pass in parameter?
because me and my colleague discover that fusio pass the right header content-type but it do not pass the right parameter
or am i getting the wrong assumption?

@zaniar
Copy link

zaniar commented Nov 6, 2017

Could you try to make a request to http://192.168.51.45:8787/erp-ws-main/ws/postdata using curl, postman, insomnia, or something else?

I think this is not Fusio's issue. More likely an issue with your target server.
Do you really following the manual about how to connect to your target server correctly?

@koswarabilly
Copy link
Author

I tried it with postman and i get a result
The url and parameter are copied from postman
As i say if the url from the SS and the parameters from the SS are linked with '?' It is the url i copied from postman

@chriskapp
Copy link
Member

Mhh ok I think the problem is that you want to send your data encoded as application/x-www-form-urlencoded. The HTTP action currently only sends data as application/json to the endpoint. That being said you can send application/x-www-form-urlencoded content to Fusio but the HTTP action will then send the request as application/json to your endpoint. If you remove the Content-Type header and simply enter {"foo": "bar"} as body, what is the response of the server?

@koswarabilly
Copy link
Author

koswarabilly commented Nov 7, 2017

i tried postman and insomnia and both successfully return a result here are the screenshots
@zaniar
screenshot from 2017-11-07 08-03-15

screenshot from 2017-11-07 09-58-57

@k42b3
do you mean it like this?i don't change the url,parameters, & method
screenshot from 2017-11-07 10-00-50

if i keep the content-type=application/x-www-form-urlencoded, it give me the same error as earlier post screenshots

@chriskapp
Copy link
Member

Ok, yes then this is the problem, that we always send the body JSON encoded. I have started to improve the HTTP Adapter so that you have beside the URL field another select box Content-Type where you can select the content type of the request payload. The adapter uses the the options json or form_params key in the guzzle request. I will let you know if this is implemented. Then you need to add the responseCode, responseParam and authParam Field to the body.

@koswarabilly
Copy link
Author

thankyou @k42b3

@chriskapp
Copy link
Member

So I have update the HTTP adapter. If you dont want to wait for the next release you could also update the adapter through composer, i.e. simply using the following command:

composer update fusio/adapter-http

@chriskapp
Copy link
Member

The latest release includes now also the updated http adapter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants