http redirect 302
Posted: Mon May 06, 2024 7:37 pm
Hello, I'm executing http_url_get to the us treasury to obtain their SDN list at the following address:
https://sanctionslistservice.ofac.treas ... rts/SDN.FF
Last week they changed their internal process to use a redirect to an Amazon server. As a result of their change, I'm now getting an error 302.
I've added code to trap the 302 error and re-post to the address returned by http_redir_loc, in line with Scott's directions in other posts. The call appears to be landing correctly, but now now I get a 403 error.
Here's the code:
URL is defined as a 2048 alpha.
URL= 'https://sanctionslistservice.ofac.treas ... rts/SDN.FF';
IFS = '/TEST/SDN.FF';
rc = http_url_get(URL:IFS);
if (rc=302);
URL=http_redir_loc;
rc = http_url_get( URL:IFS);
endif;
if (rc <> 1);
Msg = http_error;
....
Any help appreciated.
https://sanctionslistservice.ofac.treas ... rts/SDN.FF
Last week they changed their internal process to use a redirect to an Amazon server. As a result of their change, I'm now getting an error 302.
I've added code to trap the 302 error and re-post to the address returned by http_redir_loc, in line with Scott's directions in other posts. The call appears to be landing correctly, but now now I get a 403 error.
Here's the code:
URL is defined as a 2048 alpha.
URL= 'https://sanctionslistservice.ofac.treas ... rts/SDN.FF';
IFS = '/TEST/SDN.FF';
rc = http_url_get(URL:IFS);
if (rc=302);
URL=http_redir_loc;
rc = http_url_get( URL:IFS);
endif;
if (rc <> 1);
Msg = http_error;
....
Any help appreciated.