Post and Get with Wam
-
hoangtrungcs
- Posts: 15
- Joined: Wed Sep 21, 2016 12:54 pm
Post and Get with Wam
Hello everybody!
How can post url and pass parameter to other website in Wam ?
Thank you so much!
How can post url and pass parameter to other website in Wam ?
Thank you so much!
Re: Post and Get with Wam
For POST, you need to do nothing special. The form that you post must have the fields you want to pass to your target webroutine (where they should be mapped for input)
For passing fields in the url, see: https://docs.lansa.com/14/en/lansa087/i ... s%7C_____3
PS: Fields must also be mapped for input in your target webroutine.
HTH
For passing fields in the url, see: https://docs.lansa.com/14/en/lansa087/i ... s%7C_____3
PS: Fields must also be mapped for input in your target webroutine.
HTH
-
hoangtrungcs
- Posts: 15
- Joined: Wed Sep 21, 2016 12:54 pm
Re: Post and Get with Wam
Hi AbelS
Thank you so much! I will follow your link.
Thank you so much! I will follow your link.
-
hoangtrungcs
- Posts: 15
- Joined: Wed Sep 21, 2016 12:54 pm
Re: Post and Get with Wam
Can I transfer to a outside link from Wam, not local link ?
Example:
I have form with HTML with some input of parameters, and one button Submit.
After I fill value for input = 123, I click submit button then in wam I set value to a default link as same https://abc.com/data?param=123
So how can I redirect to that link from wam or other solution is Ok?
Thank you so much !
Example:
I have form with HTML with some input of parameters, and one button Submit.
After I fill value for input = 123, I click submit button then in wam I set value to a default link as same https://abc.com/data?param=123
So how can I redirect to that link from wam or other solution is Ok?
Thank you so much !
Re: Post and Get with Wam
You have to build the link yourself and use Javascript. For example see https://stackoverflow.com/questions/902 ... javascript
-
hoangtrungcs
- Posts: 15
- Joined: Wed Sep 21, 2016 12:54 pm
Re: Post and Get with Wam
Hi AbelS
Thank you for your support.
After build Javascript to redirect to another page(not LANSA page), then after processed that page will return value to LANSA.
The return url as same : https://ip/CGI-BIN/lansaweb?wam=ZTEST&w ... t=10000000
In LANSA I can not get value of additionData, and amount from link above, because in LANSA in order to get parameter from this url must have f()
==> https://ip/CGI-BIN/lansaweb?wam=ZTEST&w ... )=10000000
So do you have any solution to get value of parameter from above link without f() ?
Thank you so much !
Thank you for your support.
After build Javascript to redirect to another page(not LANSA page), then after processed that page will return value to LANSA.
The return url as same : https://ip/CGI-BIN/lansaweb?wam=ZTEST&w ... t=10000000
In LANSA I can not get value of additionData, and amount from link above, because in LANSA in order to get parameter from this url must have f()
==> https://ip/CGI-BIN/lansaweb?wam=ZTEST&w ... )=10000000
So do you have any solution to get value of parameter from above link without f() ?
Thank you so much !
Re: Post and Get with Wam
If you don't want the fields in the url, create a form, add the fields you want to send to this form and post it.
HTH
HTH
Re: Post and Get with Wam
I just noticed your field name is "additionData". You need to use the field id (short name) not the long name (See what the short name is in your LANSA repository)
-
hoangtrungcs
- Posts: 15
- Joined: Wed Sep 21, 2016 12:54 pm
Re: Post and Get with Wam
hi AbelS
Thank you so much for your support
I just create test flow in attached file.
In attached at process ③ I will receive the return parameter from target website, but in this url return don't include f() for LANSA get paramter.
So I think I should get value of these parameter from Javascript or you can get value from response target url in Wam ?
Thank you so much for your support
I just create test flow in attached file.
In attached at process ③ I will receive the return parameter from target website, but in this url return don't include f() for LANSA get paramter.
So I think I should get value of these parameter from Javascript or you can get value from response target url in Wam ?
- Attachments
-
- request_response.JPG (41.82 KiB) Viewed 22088 times
Re: Post and Get with Wam
- To pass a field value in the url you have to use the f() notation. If you don't have control on the format of the url from the target website, you will need to write a script that receives the request, translates it to the format required by a WAM and redirects the request
- Ensure that you are using the field identifier and not the long name (your last example shows the long name)
-
hoangtrungcs
- Posts: 15
- Joined: Wed Sep 21, 2016 12:54 pm
Re: Post and Get with Wam
Hi Abels
Thank you so much for your support!
Thank you so much for your support!