Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
3 replies
Subscribers
7 subscribers
Views
1685 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hello, I am trying to save in a variable the response body of a POST Reques
octavianp
over 8 years ago
Hello,
I am trying to save in a variable the response body of a POST Request, in a SAIL Interface. I first tried to use a!httpQuery (as I used to do for GET Requests), but POST method is not available.
I tried to use a!httpWrite function, but it needs to be trigered by a bind() function. The result is that I get "Invalid parameter: the parameter given as the 'set' parameter to the function 'bind' must not be null and must be a reference to a rule or function that returns Writer".
For testing purposes I tried also using Smart Service, and it works perfectly, but unfortunately it is not an option because of the usecase, so I need to make it work in SAIL.
Thanks in advance,
Octav
OriginalPostID-158055
OriginalPostID-158055
Discussion posts and replies are publicly visible
0
Eduardo Fuentes
Appian Employee
over 8 years ago
Not sure if you have reviewed how to use the bind() function at
forum.appian.com/.../Evaluation_Functions.html
but in case you haven't, that's a useful link.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
octavianp
over 8 years ago
I actually read the documentation for the bind() function, but this is the maximum I could get...
local!pass: bind(
get:
tostring(local!token),
set:
a!httpWrite(
url: "
localhost/GetToken.aspx",
method: "POST",
body: "__RequestVerificationToken="&local!response.result.body&"&UserName=xxx&TokenTimeoutMinutes=20",
headers: {
a!httpHeader(
name: "Cookie",
value: local!response.result.headers["Set-Cookie"]
)
}
)
),
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 8 years ago
There are multiple examples on how to use bind at
forum.appian.com/.../Connector_Functions.html
. They are for the connectors but the idea is the same.
Would you mind looking at those examples to see how you need to update your expression? They show the use of a bind when using a writer function.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel