Search the Community
Showing results for tags 'http'.
Found 4 results
Is it possible to perform user authentication between client app and server using SMS? I want my app to authenticate with a server, and either return a JSON with a error message, or a JSON with user profile data. Is this possible? If so, what do I need on the server side to perform the request? e.g. this gets an HTML document from google FHttp.Get('http://www.google.com'); I want to instead, post a username and password and in return get JSON (error message not authenticated, or some user profile data) but it doesn't look like TW3HttpRequest object has a put method however, there is a Open method. Can something like this be done? fHTTP.Open('POST','http://mywebsite.com/login.php'); if so, how do I pass the parameters UserId and Password?
I'm trying to download web text content into either a memo field or string variable. Most examples given in this forum and the documentation work on the IDE browser, but not on external Chrome, Safari or IE browsers. For example, this code works when I click Execute on SMS IDE, but doesn't work on external browsers: var v1, v2, v3: Variant; begin //get browser title v1 := W3IFrameHTMLElement1.Handle.contentDocument; W3Memo1.Text := v1.title; //get browser content v2 := W3IFrameHTMLElement1.Handle.contentDocument.documentElement; W3Memo2.Text := v2.innerHTML; //get browser links W3Memo3.Text := ''; v3 := W3IFrameHTMLElement1.Handle.contentDocument.links; for var i := 0 to Integer(v3.length)-1 do begin W3Memo3.Text := W3Memo3.Text +#13#10 + v3.href; end; Kindly assist.
The documentation demo posted on http://smartmobilestudio.com/documentation/networking/tw3httprequest/works - but not with all JSON files. It works with the file http://date.jsontest.com/but when I try a different JSON file the data is not displayed in the memo. For example, I'm trying to download the file http://api.worldbank.org/countries/all/indicators/SP.POP.TOTL?format=json from the World Bank open data but the file is not loaded into the memo field. Could it be the JSON format?