Http.get donne "HTTP/1.1 400 Bad Request"

Résolu
DavKli Messages postés 28 Date d'inscription mardi 10 mars 2009 Statut Membre Dernière intervention 31 octobre 2013 - 28 mars 2012 à 17:41
Cirec Messages postés 3833 Date d'inscription vendredi 23 juillet 2004 Statut Modérateur Dernière intervention 18 septembre 2022 - 28 mars 2012 à 20:46
Bonjour,

j'ai une application qui cherche certaines informations sur le net. Il utilise une http.get(link) procedure et ca marche nickel sauf pour certaines addresses come les suivantes :

http://twitter.com/statuses/user_timeline/252598263.rss
http://twitter.com/statuses/user_timeline/48671587.rss
http://twitter.com/statuses/user_timeline/18164632.rss
etc.

Les pages existant bel et bien dont j'ignore d'ou peu venir le probleme. Merci pour votre aide.
A voir également:

3 réponses

Cirec Messages postés 3833 Date d'inscription vendredi 23 juillet 2004 Statut Modérateur Dernière intervention 18 septembre 2022 50
28 mars 2012 à 20:46
ben en fait aucune ....
configuration de base:
[hr][b]var

  /bIdHTTP: TIdHTTP;
[b]begin
  with /bTIdHTTP.Create(nil) [b]do
  try
    /bmmo_Result.Text := {$IfnDef INDY10}UTF8ToAnsi{$Endif}(Get('http://twitter.com/statuses/user_timeline/18164632.rss'));
  [b]finally
    /bFree;
  end;
end;
[hr]
... et rien d'autre


[hr]@+Cirec
[hr]
3
Cirec Messages postés 3833 Date d'inscription vendredi 23 juillet 2004 Statut Modérateur Dernière intervention 18 septembre 2022 50
28 mars 2012 à 20:10
Salut,
j'ai testé les trois et toutes fonctionnent très bien chez moi
testé sous D7 & Indy9


[hr]@+Cirec
[hr]
0
DavKli Messages postés 28 Date d'inscription mardi 10 mars 2009 Statut Membre Dernière intervention 31 octobre 2013
28 mars 2012 à 20:33
Quelle est ta configuration pour l'http ?

  
  HTTP := TIdHTTP.Create(nil);
  Http.Request.UserAgent := 'Opera/9.80 (Windows NT 6.1; U; en-gb) Presto/2.10.229 Version/11.60';
  Http.Request.ContentLength := -1;
  Http.Request.BasicAuthentication := false;
  Http.ProxyParams.BasicAuthentication := False;
  Http.ProxyParams.ProxyPort := 0;
  http.HTTPOptions := [hoForceEncodeParams];
  Http.AllowCookies := true;
  Http.HandleRedirects := True;
  Http.RedirectMaximum := 5;
  Http.ReadTimeout := -2; //Timeout infini
  TmpStream := TStringStream.Create;
  http.Get(FRssLink, TmpStream);
  WebSource := TmpStream.DataString;
[...]
0
Rejoignez-nous