POST request

Aspire89

Member
Licensed User
I tried about 10 times and 2 times got send from the device, I can not understand why this has not always worked, thank you, without your help I could not do such things, will check tomorrow API Twitter, may have missed something.
 

Aspire89

Member
Licensed User
Did you manage to connect, Aspire89?
Yes, use the following code:
B4X:
    response.New1    
    Obj1.New1(False)
    request.New3("http://twitter.com/statuses/update.xml",tbUser.Text,tbPass.Text)  
    
    obj1.CreateNew("System.Net.ServicePointManager" & obj1.System_NS)
    obj1.SetProperty("Expect100Continue", False)
    
    request.ContentType = "application/x-www-form-urlencoded"
    request.Method = "POST"
    request.TimeOut = 60000

    writer.New1(Request.GetStream,False) 
    Parameters = "status=" & tbStatus.Text
    writer.WriteBytes(writer.StringToBytes(Parameters))
    Response.Value = Request.GetResponse 
    temp = Response.GetString 
    Response.Close
Thanks to everyone who helped me.
 
Top