1

I familiarised myself with passing authorization headers in android using volley library with the help of this answer. The problem is if i have to send multiple requests i need to pass it with each requestwhich makes the code longer. My question is how can i modify the ServerRequest/Request class to make sure the parameters are passed everytime i make a request.

Markus Kauppinen
  • 3,025
  • 4
  • 20
  • 30
Harshvardhan
  • 13
  • 1
  • 4

1 Answers1

0

You can use Singleton Volley class as described HERE.

So you will not need to add header everytime when you post your volley request

GreenROBO
  • 4,725
  • 4
  • 23
  • 43