Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
Vue.js. Send get/post request with headers and parameners

All I want is to create LinkedIn login component. I cannot find any information about headers and parameters. Can anyone tell me how to send GET or POST request with parameters and headers?

Here's my code with parameters. Any idea where should be headers?

await axios.get('https://www.linkedin.com/oauth/v2/authorization', {
   params: {
      response_type: 'code',
      client_id: 'MY_CODE_HERE',
      redirect_uri: 'http://localhost:8080/auth/login',
      scope: 'r_liteprofile r_emailaddress w_member_social'
   }
}).then(response => {
   console.log("INFO: " + response);
}).catch(error => {
   console.log("ERROR: " + error);
});
``
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Add a headers part in the config object passed to axios

await axios.get('https://www.linkedin.com/oauth/v2/authorization', {
   response_type: 'code',
   client_id: 'MY_CODE_HERE',
   headers: {
     'X-Header-Name': 'header value',
   },
   redirect_uri: 'http://localhost:8080/auth/login',
   scope: 'r_liteprofile r_emailaddress w_member_social',
}).then(response => {
   console.log("INFO: " + response);
}).catch(error => {
   console.log("ERROR: " + error);
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!