相关疑难解决方法(0)

Nestjs 使用 axios

这个简单的演示有一个错误 https://docs.nestjs.com/techniques/http-module

import { Get, Controller, HttpService } from '@nestjs/common';
import { AxiosResponse } from 'axios'
import { Observable } from 'rxjs'
@Controller()
export class AppController {
  constructor(private readonly http: HttpService) {}
  @Get()
  root(): Observable<AxiosResponse<any>>  {
    return this.http.get('https://api.github.com/users/januwA');
  }
}
Run Code Online (Sandbox Code Playgroud)

我该怎么办?

[Nest] 7356   - 2018-10-18 00:08:59   [ExceptionsHandler] Converting circular structure to JSON +9852ms
TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
Run Code Online (Sandbox Code Playgroud)
nest i
common version : 5.1.0
core version   : 5.1.0
Run Code Online (Sandbox Code Playgroud)

javascript node.js axios nestjs

19
推荐指数
1
解决办法
2万
查看次数

标签 统计

axios ×1

javascript ×1

nestjs ×1

node.js ×1