Miliardsto Posted April 3, 2019 Share Posted April 3, 2019 (edited) You can see my script to POST json and the problem where occurs backslashes before quotations. Second problem is the apperance , there is no new lines for every new value. LOOK in attached images! You can see rest api on the screen and with id = 0 its made my postman and the rest by autoit (with backslashes) Func jsonSave() ; Make login request to server JSON POST Local $data, $request Local $obj Local $adress = 'http://35.195.249.40:3004/msg' Json_Put($Obj, ".msgName", "Point HPs") Json_Put($Obj, ".msg", "Not pointed correctly") Json_Put($Obj, ".username", "karolek890") Local $Json = Json_Encode($Obj,$JSON_UNESCAPED_SLASHES) ; WITHOUT preetier becouse it makes clashes r n and t only works in autoit $request = _httpRequestBot($adress, 'POST', $Json) ; only get login if correct then success If @error Then Exit MsgBox(0, "Error", "Open method returned @error = " & @error & " and @extended = " & @extended) Else ConsoleWrite("Data to json server posted!") EndIf EndFunc Im using this JSON UDF Edited April 3, 2019 by Miliardsto Link to comment Share on other sites More sharing options...
Miliardsto Posted April 3, 2019 Author Share Posted April 3, 2019 (edited) kkk Edited April 4, 2019 by Miliardsto Link to comment Share on other sites More sharing options...
Miliardsto Posted April 3, 2019 Author Share Posted April 3, 2019 please help me Link to comment Share on other sites More sharing options...
Developers Jos Posted April 4, 2019 Developers Share Posted April 4, 2019 Do you seriously think it helps when you post your problem in 3 places? I for one immediately lose the urge to assist. Either way: Please don't post questions in multiple threads/forums ! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Miliardsto Posted April 4, 2019 Author Share Posted April 4, 2019 accidentaly posted in xsomething . and on json thread copied just link. sorry Link to comment Share on other sites More sharing options...
Developers Jos Posted April 4, 2019 Developers Share Posted April 4, 2019 Post all needed elements as text as none of what you have posted is runnable and will demonstrate your problem. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now