How to pass url encoded body parameters in logic app - azure-logic-apps

I have a service call in which it takes URL encoded key values in body. I'm able to get response for my request in postman. But in logic app I want to call my end service with URL encoded body params. Somehow I'm not able to achieve this. Can someone help how to pass URL encoded params in body using logic app.
Clientid and grant-type I want to pass.

Issue is resolved by using concat with encodeuricomponent

Related

How Can I get a right URL without query params after POST ACTION in my react js Application?

Just when I finished my post action i have the params that i putted in my body request shown in my url. You can have a look to thesee captures
If I get what you asked , you want to remove the params from the url after post call.
You can redirect to another link after the call ended.
If you don't change the url, the url will stay the same.

React Router Url Giving Bad Request

I am facing a issue in routing.
the issue is when i hit the url - http://localhost:3000/extInsurance/16/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiIzIiwiUm9sZUlEIjoiOCIsIlVzZXJOYW1lIjoiYWxpY2lhaGludG9uQHlvcG1haWwuY29tIiwiQ2xpbmljSUQiOiIxMjg5IiwiVXNlclR5cGUiOiJTVEFGRiIsIlN0YWZmSUQiOiIyIiwiUm9sZU5hbWUiOiJET0NUT1IiLCJCdXNpbmVzc1Rva2VuIjoiYmxvb2QwMDEiLCJPcmdJRCI6IjEzNTYiLCJCYXNlUm9sZUlEIjoiOCIsIkJhc2VVc2VyVHlwZSI6IlNUQUZ
this url get hits properly and i get the response. meaning i get redirect to correct page.
but when i push this on testing server then i am getting bad request with same url
also when i reduce the path then again it get hit properly on my testing server.
It's bad idea to use token as a part of URL path.
It's recommended to pass token as a optional URL parameter. Something like this,
http://localhost:3000/some-path?token=eyJhb...

How to remove %22 from urls in angularjs

I am working in MVC 4 and using angularJs for client side scripting.I made an edit method which posts Id of the object to the MVC controller.When i click on edit . The url it generates is http://localhost:59568/NewsLetter/GetNewsLetterDataAng?id=%2256d6ac05afb241256469194b%22
but it should be
http://localhost:59568/NewsLetter/GetNewsLetterDataAng?id=56d6ac05afb241256469194b
Because of extra %22 in the front and end it is throwing 500 error.
Please suggest me how to remove it from the url
To complete the comment above I'll let you know an other thing about how to send and get data using angular js.
If you want to pass a json object to the server it's better to do it in a POST using the $http service builtin angular like in the example below:
$http.post(url, jsonObject){...};
By doing so, you send the json object as the body of the request and in asp.net-mvc the model binder can bind that json object to a class in your C# code.
In your case there is no need, as I said in the comments, for the JSON.stringfy method call when doing a GET request.

sails couldn't read GET parameter from request after angular hashtag

I tried to integrated sails.js as a route controller and api management, using angular.js as frontend, but I found the problem when using angular to modify URL
For an example /
Original URL : http://localhost
after modify by $location.search({'lang':destLanguage});
Modified URL : http://localhost#?lang=fr
Then I am using $window.location.reload(); to reload the page to send the GET parameter to the sails controller, but when I debug at the page controller, I found that sails couldn't read the parameter from request.
req.param('lang') == undefined
I am not sure how to solve this issue. I tried to solve these issue for a whole few days.
Thanks,
After the hash are not query params for the server. It would need to be before the hash, or remove the hash all together.
http://localhost?lang=fr
instead just create function to incorporate into your app
var updateLang = function(lang){
window.location = 'http://localhost?lang=' + lang
}
The rest of the answer depends on if your angular is setup to use html5Mode = true. If so, then you can use angular's $location.search() to retrieve your values. If not, then you will need to find a plain javascript to grab that value either on page load or when / where you need it.

Get current page params '$this->params' in cake php when an ajax request is passed from it

Get current page params $this->params in cake php when an ajax request is passed from it
Is it possible to get base page params directly to ajax request function in cake php
For example
http://localhost/pages/view/2 is my base path.
I am requesting a ajax /pages/customFunction from base page.
Is it possible to get base page params as 'pages' , 'view' and 2 inside function customFunction() without passing through ajax ?
No it is not except you're using the session to store the information there.
You're making two https requests, one for the add and another one to customFunction. That's how http works.
Simply pass the same params you have used for the add method to the custumFunction in the ajax request. I don't see a problem to get this done.

Resources