1

I am using the Axios for API calls, I need to send an array of strings in a GET Request how can I add my list in params(in URL)

1 Answer 1

3

This might help

import axios from 'axios';

axios.get('/api', {
    params: {
      data: JSON.stringify(data)
    }
  })
  .then(function (response) {
    console.log(response);
  })
Sign up to request clarification or add additional context in comments.

1 Comment

or also const response = await axios.get('/api', { ... });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.