Hello,
I'm trying to build a sign up system by using online restful db (restdb.io). When I try to use poststring I get an http error 500.
Here is the code:
and the log;
Application_Start
Application_Active
Application_Active
username=Ahmet&password=ahmet
["username","Ahmet","password","ahmet"]
(empty string)
ResponseError: unknown error, status code: 500
Am I creating the json format wrong or what???
Thanks for the help in advance...
BR
I'm trying to build a sign up system by using online restful db (restdb.io). When I try to use poststring I get an http error 500.
Here is the code:
B4X:
Dim yeni_kayit As HttpJob
Dim json_gen As JSONGenerator
Dim liste As List
If password_2.Text == re_password.Text Then
liste.Initialize
liste.Add("username")
liste.Add(username_2.Text)
liste.Add("password")
liste.Add(password_2.Text)
json_gen.Initialize2(liste)
Dim yazı As String
yazı=json_gen.ToString
yeni_kayit.Initialize("yeni_kayit", Me)
'yeni_kayit.Download2("https://todolist-0927.restdb.io/rest/users", Array As String("username", username_2.Text, "password", password_2.Text))
'yeni_kayit.PostString("https://todolist-0927.restdb.io/rest/users", "{""username"":""" & username_2.Text & """,""password"":""" & password_2.Text & """}")
yeni_kayit.PostString("https://todolist-0927.restdb.io/rest/users", "username="& username_2.Text & "&password=" & password_2.Text)
'yeni_kayit.PostString("https://todolist-0927.restdb.io/rest/users", yazı)
yeni_kayit.GetRequest.SetHeader("cache-control", "no-cache")
yeni_kayit.GetRequest.SetHeader("x-apikey", "8722bfb53652e20d586776f422bea1649239a")
yeni_kayit.GetRequest.SetHeader("content-type", "application/json")
Log("username="& username_2.Text & "&password=" & password_2.Text)
Log(yazı)
Log(yeni_kayit.GetString)
End If
and the log;
Application_Start
Application_Active
Application_Active
username=Ahmet&password=ahmet
["username","Ahmet","password","ahmet"]
(empty string)
ResponseError: unknown error, status code: 500
Am I creating the json format wrong or what???
Thanks for the help in advance...
BR