A
A
ABCquestion2021-12-29 23:29:44
JavaScript
ABCquestion, 2021-12-29 23:29:44

Why the error Arguments expected: 3, received: 1.?

how to fix?

const data = {
      method: 'GET',
      url: '/code',
      params: { phone },
    };

test( { method = 'GET', url = '', headers, body, params }){
  const req = {
      method,
      url,
      data: body,
      params,
      headers
    };
}
const res =  test(data);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question