Getting 308 Permanent Redirect

I am getting following response when I use Influxdb web api’s on my local machine and AWS instance:

<head><title>308 Permanent Redirect</title></head>
<center><h1>308 Permanent Redirect</h1></center>

This is encountered only when the api’s are run through the code.
But I don’t get this response when I use the postman to access the api.

API Request Details.:

    Authorization: 'Token <my_token>',
    Host: '',
    Accept: '*/*',
    Connection: 'keep-alive',
    Content-Type: 'application/json,
    Cache-Control: no-cache

I never got this response when I was using the “ap-southeast-2” region.
Please help in resolving this.


Ok I found the issue.
I was actually hitting the request through “http” module instead of “https” in Node.js.
It returned a redirect location which my code was not handling.
Using the “https” module of Node.js fixed my issue.


Hello @varad,
Thank you for sharing your solution!! :slight_smile: