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
8 subscribers
Views
1704 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 9 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
Parents
0
octavianp
over 9 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
Reply
0
octavianp
over 9 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
Children
No Data