June 23, 20178 yr I'm trying to get a token from an authorization server using cURL in Insert From URL. When I make the following request in Terminal curl -i -X POST -d 'username=myaccountname&password=mypassword' https://authserver.com/login I get the token back in the response header. Since FileMaker doesn't support the --include (-i) option I haven't been able to figure out how to get the response header with the token. Anyone have any ideas on how to accomplish this? Thanks in advance! -Kent UPDATE: Okay, I figured out I can get a response header by using the option --dump-header and setting it to a variable. The only problem now is that the token comes from a redirect location and I'm only getting the response header from the original URL. I'll keep working on it but I'll be happy to get whatever advice anyone can offer in the meantime. Edited June 23, 20178 yr by Kent Searight
June 23, 20178 yr Author Never mind. I got it to work with the following cURL options.-L -d 'username=myaccountname&password=mypassword' --cookie-jar $cookies I'm curious though if anyone knows why FMI chose not to support the --include option. Edited June 23, 20178 yr by Kent Searight
July 7, 20178 yr Author 7 hours ago, Wang said: How did you get response header with dump-header? Turned out I didn't need the headers. The result of --cookie-jar was all I needed. But if I'd wanted the headers too all I'd need to do is follow that option with a variable and it would write to that. Example: --dump-header $myVariable.
Create an account or sign in to comment