sanjay
sanjay

Reputation: 437

Flowgear Insert form post data into database

How to insert post data into database using flowgear API? I am done inserting data using get but html form post method is not work using flowgear API. Please explain how it is acheive in flowgrear.

I have this URL

http://www.somedomain.com/api/flow-test

When I hit enter it is return JSON value

{
  "message" : "message send successfully",
  "statusCode" : "1"
}    

This JSON value store into database using flowgear post method.

Upvotes: 2

Views: 184

Answers (2)

Daniel
Daniel

Reputation: 504

If you want to POST some data to a Flowgear API endpoint and then ingest that into a database, add the special property FgRequestBody on to a Variable Bar to receive the POST data.

If it's in JSON format, use JSON Convert to convert it to XML, then push it through a transform (XSL Transform or QuickMap) if it's layout doesn't match your target database.

Finally, use an SQL Table Update to insert to the data into the database.

Upvotes: 1

Skillie
Skillie

Reputation: 151

When calling a Flowgear Workflow using an API call, the Workflow can respond with a specific body using the FgResponseBody and FgResponseContentType variables on the Variable Bar.

Upvotes: 0

Related Questions