0

I am trying to use curl command , but I keep on getting Authentication required error time and again.The part of reponse is shown below :-

"Authentication Required" response (307) 

I am working on a network which is behind a proxy server. So have tried to provide the proxy authentication during the request too. But have not been successfull. Please suggest a solution.

Ashit_Kumar
  • 601
  • 2
  • 10
  • 28
  • On a 307 GET request, the answer 'Location' head attribute should also contain a redirect URI to follow, isn't this the case? – Andrea Salicetti Aug 20 '15 at 08:25
  • @AndreaSalicetti no the answer doesn't have a Location attribute in it.The response which I am getting is Authentication Required

    Authentication Required



    – Ashit_Kumar Aug 20 '15 at 08:38

1 Answers1

0

if the URL you are trying to access is behind a login wall, you need to supply the HTTP Header "Authorization". for example, if the server accepts basic authorization: header=Authorization, value="Basic user:password". replace user and password with your account credentials.

see related answer: Setting authorization using CURL

Good Luck!

Community
  • 1
  • 1
Tom Elias
  • 751
  • 6
  • 15