Page 1 of 3

HttpWebRequest Post?

Posted: Sun Dec 02, 2012 1:34 pm
by Joe Bohen

Hi,

Is it possible to post to the Tiggzi database from a windows form application using HttpWebRequest ?


HttpWebRequest Post?

Posted: Mon Dec 03, 2012 1:12 am
by maxkatz

Sure, you can do it from anywhere as long as you issue a standard POST request.


HttpWebRequest Post?

Posted: Mon Dec 03, 2012 8:22 am
by Joe Bohen

Hi Max

That's good, could you post an example of the URL required to a post to a tiggzi database with two fields one called 'message' and the other 'datecreated' please.

Regards,
Joe


HttpWebRequest Post?

Posted: Mon Dec 03, 2012 12:08 pm
by Joe Bohen

Hi Katya,

Sorry about the spelling of your name in the last reply..

I realised I had truncated the string which should look like:

https://api.tiggzi.com/rest/1/db/coll...

The response from the server was:

{"code":"undefined","description":"No resource method found for GET, return 405 with Allow header"}


HttpWebRequest Post?

Posted: Mon Dec 03, 2012 2:48 pm
by Kateryna Grynko

URL for adding a row in database must look like:
https://api.tiggzi.com/rest/1/db/coll...

However, to add a row you have to make POST request with special http header parameters.
You can see how to execute a request using tool curl:
http://en.wikipedia.org/wiki/CURL

You cannot do it using GET request.


HttpWebRequest Post?

Posted: Sat Dec 08, 2012 9:14 pm
by Joe Bohen

Hi, I have found Curl a really difficult process to get my head around! The links you have provided don't help that much! Being able to interact with the data source is absolutely key to my app! Can you give me anymore information that will aid me in getting over this hurdle?

Regards,
Joe


HttpWebRequest Post?

Posted: Sat Dec 08, 2012 9:21 pm
by maxkatz

You don't need to work with curl command. From Project view, Create New Database Services. It will generate all the services you need automatically.


HttpWebRequest Post?

Posted: Sat Dec 08, 2012 11:07 pm
by Joe Bohen

Hi Max,

How does this help when I need to make Posts or Gets via HttpWebRequest from an external application?

Regards,
Joe


HttpWebRequest Post?

Posted: Sat Dec 08, 2012 11:18 pm
by Joe Bohen

From Project view, Create New Database Services.

My screen freezes when using this from project view!


HttpWebRequest Post?

Posted: Sun Dec 09, 2012 12:20 am
by maxkatz

If you are making a request from an external app (not from an app built in Tiggzi) then you do need to look at the curl command. I don't know what programming language you use, but you would need to put the request and the curl command is your guide.