最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angular - Inconsistent property case after serialization - Stack Overflow

programmeradmin2浏览0评论

I have these two interfaces

interface Country {
  name: string,
  flag: string,
  code: string,
  dialCode: number
}

interface RegisterRequest {
  email: string,
  name: string,
  surname: string,
  password: string,
  rememberMe: boolean,
  country: Country
}

then I have a field

protected form = {} as RegisterRequest;

finally I do

this.http.post('/auth/register', this.form).subscribe(...);

The request body looks like this

{
  "name": "John",
  "surname": "Doe",
  "country": {
    "name": "Burundi",
    "flag": "
发布评论

评论列表(0)

  1. 暂无评论