Jump to content

Search the Community

Showing results for tags 'post'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


There are no results to display.


  • Welcome to Smart Mobile Studio
    • News and Information
    • Pre-Sales Questions
    • Smart In the Media
    • Smart Contests
    • Meta
  • Smart Mobile Studio Discussion
    • General
    • IDE
    • RTL
    • Code
    • Client Server
    • Platform
    • Graphics
    • Deployment
    • Suggestion box
  • Smart Mobile Studio support
    • Support
    • Bug report
  • General Discussion
    • Pascal
    • Delphi
    • Javascript
    • HTML/HTML5
    • CSS
  • Resources
    • Website
    • Download Smart Mobile Studio

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL



Company name


Found 4 results

  1. Ricardo

    Rest Api

    Hi. I'm trying TRestApi and I have a problem with external browsers I have tried using TRESTApi.Post, the connection is established and works Ok using the internal browser: the server receives a POST and send me data. But if I use it from firefox or chorme, the server receives an OPTIONS (no GET, no POST) and gets into an infinite loop until I close the page. If this did not happen I could forget about the sockets, I think. With Rest the code i use is: try FRestAPI := REST[IP, URL].OnError(gestionError); FRestAPI.Call .Header('Content-Type', 'application/json') .Header('Authorization',Token) .NoRandomize .OnDone( lambda(http) parsea(http.ResponseText); end ) .Post(resultado); finally FRestApi.Free; end; Usin external navegator, the server receive this. No return data and enter on an infinite loop. OPTIONS /api/myurl HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Access-Control-Request-Method: POST Access-Control-Request-Headers: authorization,content-type Origin: Connection: keep-alive usin internal navigator, the server receive this POST /api/ myurl HTTP/1.1 Host: Connection: keep-alive Content-Length: 45 Accept: */* Authorization: ;A2 Content-Type: application/json Origin: User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36 Referer: Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.8
  2. Ricardo

    POST by Sockets

    Ok, now the socket connection is established. But the server is waiting for a POST with a JSON. I have tried this var jso := TJSonObject.Create; jso.AddOrSet("Tabla", "Login" ); jso.AddOrSet("Valor", trim(edCodigo.Text)); jso.AddOrSet("Clave", trim(edClave.Text)); try FSocket.Connect('ws://',[],nil); except On E : Exception do showMessage(E.Message); end; FSocket.Write(jso.ToString); //try this FSocket.Write(jso.ToJson); //and this The server receive this: GET /api/myurl HTTP/1.1 Host: Connection: Upgrade Pragma: no-cache Cache-Control: no-cache Upgrade: websocket Origin: Sec-WebSocket-Version: 13 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.8 Sec-WebSocket-Key: SBmnhjj2RfnqapogFofwKA== Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits no json received
  3. Ricardo

    JSON Post

    Hi All. This is my first post. I need help to start my first test project. I want to send and receive json objects to a server socket on port 8082. The json structure to send is like this: {"Command":"Open","Table":"Client","Code":"XXXX"} The json structure to reveive is like this: {"Code":"XXXX", "Name":"Name of client",.....} My version of SMS is Thanks!!

    Reading a JSON POST

    I'm trying to build a Facebook messenger bot. It requires reading and sending JSON data from messenger. Sending a json post message is no problem. Anyone with an idea on how to READ incoming JSON POST data using SMARTMOBILESTUDIO? In other words can a SMARTMOBILESTUDIO html webapp work as a webhook?
  • Create New...