Skip to content

解析 AxiosResponse 是否符合預期格式 #12

@Shishamou

Description

@Shishamou

將原先專案內的 resolveResponse() 相關補助方法抽離,並整合進 RestPromise

let data = async axios.get(API_URL)
  .then(resolveResponse(RESPONSE_WITH_DATA))
  .then((res) => res.data.data);
  .catch((error) => {
    console.error('回傳格式不符合預期');
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions