Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Synapse Post Problem (https://www.delphipraxis.net/179686-synapse-post-problem.html)

Peter666 24. Mär 2014 17:55

Synapse Post Problem
 
Hi,

ich hab ein Problem mit folgendem Code:

Delphi-Quellcode:
var http: THTTPSend;
  param: TStringstream;
begin
  http := THTTPSend.Create;
  param := TStringstream.Create('v=9NMYYkETjcs');
  http.MimeType := 'application/json';
  http.Protocol := '1.1';
  http.Document.LoadFromStream(param);
  http.Document.Seek(0, 0);
  http.HTTPMethod('POST', 'http://192.168.1.100:8008/apps/YouTube');
  http.free;
  param.free;
Im Prinzip sollte der das gleiche machen wie:
curl curl -H 'Content-Type: application/json' http://192.168.1.100:8008/apps/YouTube -X POST -d 'v=9NMYYkETjcs'

Mit curl wird auf dem Chromecast, das bei mir unter 192.168.1.100 gefunden wird youtube gestartet und das Video geladen. Mit dem Code oben bekomme ich ein Http 1.1 404 Not Found als Antwort.

Ich versteh das nicht, warum das nicht geht. Hat jemand eventuell eine Idee?


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz