Skip to content

Instantly share code, notes, and snippets.

@Irwin1985
Created October 23, 2020 07:48
Show Gist options
  • Save Irwin1985/eeaa74e560f8824ca0c1d2d7e15560d0 to your computer and use it in GitHub Desktop.
Save Irwin1985/eeaa74e560f8824ca0c1d2d7e15560d0 to your computer and use it in GitHub Desktop.
* Comandos probados
* JSON
CREATE JSON OBJECT FROM FILE | CURSOR | identifier | STRING -> OK
PRINT JSON varJSON TO identifier | IN SCREEN -> OK
* HTTP
HTTP GET MyHTTPObj
URL 'the url'
ADD HEADER 'header' WITH 'header value'
* CONNECTION
SET ENGINE TO 'Firebird'
SET ENGINE CONNECTION TO MyConn
========================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Test de conexion a MySQL
CREATE CONNECTION MyConn ;
USER 'root' ;
PASS '1234' ;
DRIVER 5.0 ;
PORT 3306 ;
DATABASE getiang
USE almacenes IN 0
REPLACE ALL CODIGO WITH 'PRUEBA' IN almacenes
SAVE almacenes
CLOSE CONNECTION MyHnd
// Fin
create connection myCon for 'MySQL' ;
user 'root' ;
pass '1234' ;
server 'localhost' ;
database 'mydb' ;
port 3306
* Custom VFP syntax for HTTP commands.
DEFINE HTTP MyHTTPObj ;
METHOD GET ;
URL 'the url' ;
ADD HEADER 'header' WITH 'header value' ;
# JSONFox example
CREATE JSON OBJECT MyJSON FROM myJSONStr
# JSON OBJECT example
CREATE JSON OBJECT MyJSON FROM myJSONStr
# CURSOR FROM JSON ARRAY example
Create CURSOR FROM JSON ARRAY myArray
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment