ZRomik
Members-
Content Count
54 -
Joined
-
Last visited
Everything posted by ZRomik
-
Hi! I wrote small app for Android for test. In OnCreate method I request Some permission from OS FStorageRead := JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE); FStorageWrite := JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE); FReadSms := JStringToString(TJManifest_permission.JavaClass.READ_SMS); PermissionsService.RequestPermissions([FReadSms, FStorageRead, FStorageWrite], nil, DisplayRationale); So, only requests READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE works fine. Is anybody know why READ_SMS permission not requested? I use for test my Xiaomi Redmi Note 4 with MIUI-10 on Android 6.0. On Android emulator is the same thing.
-
Yes! On phone work too Thanks for help Lars Fosdal
-
After clean and rebuild project on emulator READ_SMS permission work fine. I Try on phone after charging them
-
>Has SMS access been enabled for the app in the Android settings? Yes And I enable "Read SMS"and "Send SMS" in "Uses Permissions" tab in Project Options
-
Is there an ics library for lazarus?
-
Today I got strange assert This assert raised before I free the components. I'm doing rest auth, after close app and got assert.
-
Hello all! I'm writing small program for rest authorization. So, authorization process is OK. I successfull get "access" and "refresh" tokens. Next I need to post GET request on some url with the following header: "Authorization: Bearer *Access token wich I got*" In the internet I fouded an example how to write get request and writed following code: procedure TForm1.RetrieveUserInfo; var url: string; rcv: TMemoryStream; begin url := sAuthURL + 'oauth/verify'; rcv := TMemoryStream.Create; slhtpcli.RcvdStream := rcv; slhtpcli.ExtraHeaders.Add('Autorization: Bearer ' + FAccToken); mmo1.Lines.Clear; slhtpcli.URL := url; try slhtpcli.GetASync; finally mmo1.Lines.LoadFromStream(rcv); FreeAndNil(rcv); end; end; Response from server always empty. What I'm writed wrong?
-
Thank for help. I'm doing sync request in for cycle and sometime got yhis error. Problem solved when i add empty for cycle for 1000 times.
-
Another question about HttpCli. How do I know if a component is ready to work? Sometime I get error
-
OK. Thanks
-
Can you tell me more how to do this?
-
Angus, is there possible get response from server not by event, like in Synapse eg
-
all that had to be done was to add this code. cli1.Accept := 'application/json;'; Now I successfull recieve data from server. Thanks for help!
-
I tried to build manual the parameters with SuperObject but still got error
-
I tried to do that you say, but got error too. This is the example from server I tried to use both address string: "POST https://esi.evetech.net/latest/universe/ids/?datasource=tranquility&language=en-us" and "POST https://esi.evetech.net/latest/universe/ids/" with same result
-
Angus, I'm really can't find where specifyed Json parameters in example you told
-
In examples I can't find sample with post request.
-
About error Bad request: The exception class is EHttpException. This class described in unit OverbyteIcsHttpProt.pas. Its's not response from server, but internal component error as I understad.
-
I set breakpoint at line cli1.Post and look inside component code: In method AdjustDocName field FDocName changed from '/latest/universe/ids/' to 'document.htm' When we enter in method "TCustomWSocket.DnsLookup" the field "FDnsLookupHandle" is equal 0 and code after line 9438( unit OverbyteIcsWSocket.pas) not executing. So, we not execute DnsLookup and DnsList is clear. As I understud we not establish connection with server and not sent any data
-
Looks like program not send any data to host
-
I'm download and run Wireshark. Set filter as "ip.dst == 52.51.209.180"(ping to esi.evetech.net gave me that address). But wireshark does't seen any packet to host, exclude ping
-
OK. I'll try to find another app. Tnanks for advise.
-
I add code FSndStrm.Seek(0, soFromBeginning); But this not helps. I recieve from server "{"error":"too few items for 'names', 'names' is required"}"
-
Again trying send post-request as follow: if Not Assigned(FRcvStr) then FRcvStr := TMemoryStream.Create; if not Assigned(FSndStr) then FSndStr := TMemoryStream.Create; s := '{"names": ["Water"]}'; FSndStr.Write(s[1], Length(s)); cli1.SendStream := FSndStr; cli1.RcvdStream := FRcvStr; cli1.PostASync; So, If I use method Post then I get eror "BadRequest". If I use method PostAsync then I got answer; "{"error":"too few items for 'names', 'names' is required"}". Looks like data not sending to server.
-
Hello Again! OK, I need to get some data from server accross post-request. I write small app but always get error "Bad request". Can you see my code please? I use property ContentTypePost for set content-type as "application/json" post_test.zip