Alternatively: Would it be possible to run the process on an FMP client which does still save the cookiejar data to a variable, and use that as a point of reference to compare the full returned header to the cookiejar data (and from that, infer the answer)?
I’m running the script locally, but FMP is not saving the cookie. My script used to work perfectly, so I believe this issue may have been propagated to FMP. If I can’t parse the cookie out of the header, I’ll try downloading MBS.
Yes, that’s the format I’m using. That script used to work perfectly, and now fails to load the cookie. I was able to use a workaround to parse the cookie from the header. Now, however, when I pass the cookie to a second Insert From URL script step, the script seems to be logging in correctly, but the text file is not loaded. I’ve confirmed the URL for the text file, so I’m not sure what’s happening at this point.
Could you give us an idea of what the returned headers are when you perform the request without the -L option?
I am thinking that, if you are receiving a 302 response, that there's a reasonable chance that the response headers will include a Location header which will supply you with the next URL that you'd need to connect to (and while doing so, continuing to pass along any cookies that apply).
This makes for a more laborious task to get to the data that you want, and normally I would think that this should not be necessary, but, if the cookie jar functionality is not working as it once did, I feel that all bets may have to be off with respect to my usual expectations for this type of endeavor.
Also, on a separate matter:
I'd like to encourage you to adopt the habit of not using $variables (that is, variables with $ or $$ scope) in your Let or While calculations, unless there really is a need to do so. In many/most cases of using Let or While, all that is needed are variables that do not have the $ or $$ prefix. Whenever this is so, it is a good habit to use variables that are not scoped to the level that $ or $$ variables have.
When I use Insert from URL to log into the server with my credentials I get a 302 response and then a 200 response. (This indicates my login has been accepted.)
FileMaker Pro 21 now stores the login cookie, which previous versions would not do. I am then using substitute to reformat the cookie per a post on the Community page..
I am then using a second Insert from URL script step to download the text file. I get a 302 response, then a 200 response. So, I believe FileMaker is successful passing the cookie.
However, the data retrieved is just website html, and not the text file I am attempting to download.
Inspect the headers. Insert from URL isn’t a browser, but If you are able to do this in Postman, and produce a work flow to obtain the file then you should be able to emulate it in fmp.