Guest User

Untitled

a guest
Jul 10th, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. curl --header 'Expect: ' -F username=your_username_here
  2. -F password=your_password_here
  3. -F proxy='{"proxy": "http://user:password@127.0.0.1:1234","proxytype": "HTTP"}'
  4. http://testapi.com/api/xoxo
  5.  
  6. const proxy = JSON.stringify({
  7. proxy: this.proxy,
  8. proxytype: 'HTTP',
  9. });
  10.  
  11. const data = new FormData();
  12. data.append('username', config.username);
  13. data.append('password', config.password);
  14. data.append('proxy', proxy);
  15.  
  16. try {
  17. const captcha = await axios.post(
  18. 'http://testapi.com/api/xoxo',
  19. data,
  20. { headers: { 'Content-Type': 'multipart/form-data' } }
  21. );
  22. console.log(response);
  23. } catch (err) {
  24. console.log(err.response);
  25. }
Add Comment
Please, Sign In to add comment