Bonjour à tous,
J'essaye de m'authentifier à une API et rencontre un problème.
Alors voila l'authentification se passe bien, je créer un fichier texte et dedans écrit le header récupéré pour cette authentification grâce à CURLOPT_WRITEHEADER.
Voici à quoi cela ressemble à l'intérieur de mon fichier texte :
Maintenant j'aimerai le récupérer pour pouvoir accéder aux autres fonctionnalités de l'API. Voici mon code :HTTP/1.1 200
Bearer: <N.?|T,*V=bpc&VKU:5wxA%_d2SM;*t@2^2X/<doA7lh(jz}[:co?(j]i1A9?rTzXF9Po9CW[;TPyghw13NROMxN}7<ACreRmrzKk6[<zI9{*rz*@/3Ae$O_Oc|:*L.Nde20*$/Iu$xOb5sZ{eVa@'g=jc=SOU$Ilc.X,NruIwocWq]Rx3H*$Wlk=cvc<vOYg4UcNdkoSYV.pDNG{Uf>~{_QjOc2N%SZv5PWmgw>xaC*r~F;Zi/t|&<?:[dpu-
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 0
Date: Thu, 16 Jan 2020 14:28:02 GMT
Cependant cela me renvoie 400. Je ne comprends pas quelqu'un pourrait m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Un grand merci à tous !

 

 
		
		 
        

 
			
			

 
   
 


 récupérer un header dans un fichier texte avec curl
 récupérer un header dans un fichier texte avec curl
				 Répondre avec citation
  Répondre avec citation
Partager