Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Can PH make an http post? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: September 20 2011 at 09:44 | IP Logged Quote MrGibbage

Is there a PH formula that can generate an http post, including the
headers and body?

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 20 2011 at 13:19 | IP Logged Quote dhoward

Skip,

No function currently exists in PowerHome that form an HTTP post statement for you. I was going to say I'll put it on the to-do list but started thinking about it and couldnt figure out a way to make a generic type function to populate all of the basic fields. It would almost be just as easy as doing it from scratch. Obviously you would need the resource you're requesting, the content-type, authentication, etc. but then you'd need to almost pretty much supply the body yourself because you would need the individual form elements that you would like to post. I could probably put together something that would take an http GET and convert that to a POST, not sure if that would help or not.

Give me a little more info and I'll see if something can be done.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: September 20 2011 at 13:33 | IP Logged Quote MrGibbage

I am enabling C2DM for my Android app. C2DM (cloud to device messaging) is a lot like text
messages. They are instant, short messages that can be sent directly to a phone.

As for the http post from PH, the C2DM service requires the message to the C2DM server to be
formatted as HTTP Post. I was thinking that if I could get PH to send the POST, that would
make my life a lot easier.
Read here for more details:
http://code.google.com/android/c2dm/

Look for the section near the bottom called "How the Application Server Sends Messages".
In this context, PH will be the application server.


__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: September 21 2011 at 11:15 | IP Logged Quote MrGibbage

As for the http post from PH, I can do it with curl, so I will go that way.

__________________
Skip
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum