B4J Question postmultipart

jesuslizonsoluciones

Member
Licensed User
Longtime User
Hi everyone


For the first time I am using wep api, to record on a server.


The get procedure works for me without any problem; but when I try to write back to the database with the same structure I get error 500


I have tested the structure in the POSTMAN utility of windows and it works without problem, but when I send it through b4A it gives me the error


Any ideas?


thanks





B4X:
Dim j As HttpJob
    
j.Initialize("", Me)
j.Download("http://xxx.yyy.com/AWWebAPI/api/aw/awa/GetAWAReservation?Hotel=H06&Localizador=42652447")
Wait For (j) JobDone(j As HttpJob)
    
    If j.Success Then
        
        Dim jp As JSONParser : jp.Initialize(j.GetString)
    
        Map = jp.NextObject
        
        Log(Map)
        
        Dim jGen As JSONGenerator : jGen.Initialize(Map)

        Dim root As Map
        
        parser.Initialize(j.GetString)
        root = parser.NextObject
        
        root.Put("Hotel", "H06")
        
        Dim j1 As HttpJob
    
        j1.Initialize("", Me)
        j1.PostMultipart("http://xxx.yyy.com/AWWebAPI/api/aw/awa/PostAWAReservationGuests",root,Null)
        Wait For (j1) JobDone(j1 As HttpJob)
 
Top