using the https module and ping external service,...
# suitescript
s
using the https module and ping external service, how can i know if the other service redirected to a different page
Copy code
let raw = https.get({
      url: url,
      headers: {
        "Content-Type": "application/json",
        Authorization: `Bearer ${response_token.access_token}`,
      },
    });
    log.debug("res", { raw, url });
r
response statuses for redirects are typically in the 300 range. normally 301 or 308 or 309. HTTP response status codes - HTTP | MDN
s
That wasn't the question , will it follow the redirect and then only return and then get 200