It's kind of weird because sometimes it just works and sometimes it does not! On windows it just works fine when setting this:
Code: Select all
libUrlSetSSLVerification false
Code: Select all
local vName,vPass,vBody
global vUrl,vHeader
on changeLogin
ask question "Wie lautet ihr Benutzername?"
put it into vName
ask password "Wie lautet ihr Passwort?"
put it into vPass
put the text of fld "Json" into vBody
replace "xx" with vName in vBody
replace "yy" with vPass in vBody
globaleUrl #sets the variable to default url eg "https://myurl,com"
put "/api/login"after vUrl
post vBody to url vUrl
answer the result && it
go to next
end changeLogin
Code: Select all
{
"username":"xx","password":"yy"
}
Code: Select all
User-Agent: Appname
Content-Type: application/json; charset=utf-8
Code: Select all
put char 5 to -1 of line lineoffset("Set-Cookie: PLAY_SESSION=",libURLLastRHHeaders()) of libURLLastRHHeaders() after vHeader
I tried it on two servers; 1 server with selfsigned ssl and 1 server with verified digi cert...
Hope somebody can help me out with this...