![]() |
Post json with authentication using NetHTTPClient1 in delphi-xe
I am trying to access kodi via json using NetHTTPClient1 with no success ...
this is my code:
Code:
how can i solve?
var
Strm: TStringStream; begin Strm := tstringstream.Create(Edit_send.text, tencoding.UTF8); Strm.WriteString(''); Strm.Position := 0; self.NetHTTPClient1.Accept := 'application/json'; self.NetHTTPClient1.ContentType := 'application/json; charset=utf-8';//application/json self.NetHTTPClient1.AcceptEncoding := 'UTF-8'; self.NetHTTPClient1.Post('http://admin:mypw@192.168.1.1:8080/Jsonrpc',Strm,nil).ContentAsString(tencoding.UTF8); thank you |
AW: Post json with authentication using NetHTTPClient1 in delphi-xe
Which error message do you get?
Welche Fehlermeldung erscheint? With basic auth, user name and password should be set as a http request header. Authentication: Basic <credentials> See ![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:48 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