Skip to content

请问如何在getServiceNodeInfo函数中获得Post返回的数据做二次加工,同时对Post传递参数,在返回到controller中 #36

@xietianbao80

Description

@xietianbao80
import { Injectable, Body, Inject } from "@nestjs/common";
import { Loadbalanced } from "@nestcloud/loadbalance";
import { Get, ost } from "@nestcloud/feign";
// import { AXIOS_INSTANCE_PROVIDER } from "@nestcloud/http/http.constants";

@Injectable()
// enable loadbalance supports, need import @nestcloud/loadbalance module at first.
@Loadbalanced("service-test")
export class ServiceNodeClient {
  // constructor(@Inject(AXIOS_INSTANCE_PROVIDER) private readonly httpService: HttpClient) {}
  // constructor() {}

  @Post("/service-test/get-service-test-info-by-caller-test")
  async getServiceNodeInfo() {}

  @Get("http://test.com/users")
  // disable loadbalance supports.
  @Loadbalanced(false)
  getRemoteUsers() {}
}

请问如何在getServiceNodeInfo函数中获得Post返回的数据做二次加工,在返回到controller中,同时对Post传递参数

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions