title: NestJs Timeout issue with HttpService
body: <p>I am facing a <strong>timeout</strong> issue with nestJs Httpservice.</p>
  <p>The error number is -60 and error code is 'ETIMEDOUT'.</p>
  <p>I am basically trying to call one api after the previous one is successfully.</p>
  <p>Here is the first api</p>
  <pre><code>getUaaToken(): Observable&lt;any&gt; {
      //uaaUrlForClient is defined
      return this.httpService
        .post(
          uaaUrlForClient,
          { withCredentials: true },
          {
            auth: {
              username: this.configService.get('AUTH_USERNAME'),
              password: this.configService.get('AUTH_PASSWORD'),
            },
          },
        )
        .pipe(
          map((axiosResponse: AxiosResponse) =&gt; {
            console.log(axiosResponse);
  
            return this.getJwtToken(axiosResponse.data.access_token).subscribe();
          }),
          catchError((err) =&gt; {
            throw new UnauthorizedException('failed to login to uaa');
          }),
        );
    }
  
  </code></pre>
  <p>Here is the second api</p>
  <pre><code>  getJwtToken(uaaToken: string): Observable&lt;any&gt; {
      console.log('inside jwt method', uaaToken);
      const jwtSignInUrl = `${awsBaseUrl}/api/v1/auth`;
      return this.httpService
        .post(
          jwtSignInUrl,
          { token: uaaToken },
          {
            headers: {
              'Access-Control-Allow-Origin': '*',
              'Content-type': 'Application/json',
            },
          },
        )
        .pipe(
          map((axiosResponse: AxiosResponse) =&gt; {
            console.log('SUCUSUCSCUSS', axiosResponse);
            return axiosResponse.data;
          }),
          catchError((err) =&gt; {
            console.log('ERRRORRRORROR', err);
  
            // return err;
            throw new UnauthorizedException('failed to login for');
          }),
        );
    }
  </code></pre>
  <p>Both files are in the same service file. Strangely, when i call the second api through the controller like below. It works fine</p>
  <pre><code>@Post('/signin')
    @Grafana('Get JWT', '[POST] /v1/api/auth')
    signin(@Body() tokenBody: { token: string }) {
      return this.authService.getJwtToken(tokenBody.token);
    }
  </code></pre>
  <p>When the two api's are called, however, the first one works, the second one that is chained is giving me the timeout issue.</p>
  <p>Any ideas?</p>