Jump to content
  • Advertisement
Sign in to follow this  
lonewolff

'Posting' in HTML

This topic is 3936 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I recently downloaded an API for a particular website that requires you to 'post' messages to perform various tasks at their end. For example updating user details and the likes. I understand how there API works but do not know how to 'post' messages in HTML. Can anyone please shed some light on how to post a message? I have googled but this doesn't seem to clear it up for me, unfortunatly. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
To send a HTTP message you just send a certain text string over TCP to the according server, that's all. Take a look at 'http://www.jmarshall.com/easy/http/' for further help.

--
Ashaman

Share this post


Link to post
Share on other sites
Quote:
Original post by lonewolff
Sorry, you are right it think. Probably HTTP within HTML code.


It's the other way around.

HTML is a way of formatting data that is sent over the internet.

HTTP is a way of sending the data. That's why URLs (URIs?) start with 'http://'; it indicates the protocol (the 'P' in http) that will be used to send the data.

Normally, when you send a message to the web server, you don't send anything in HTML. Instead, you send a request for data, either a HEAD, GET or (apparently what they want you to use this time) POST request. The data you receive in response typically has a header, followed by (for non-HEAD requests) the contents of the thing you requested. When that thing is a web page (.htm or .html extension), it typically consists of HTML data (hence the extension).

Share this post


Link to post
Share on other sites
Quote:
Original post by Ashaman73
To send a HTTP message you just send a certain text string over TCP to the according server, that's all. Take a look at 'http://www.jmarshall.com/easy/http/' for further help.

--
Ashaman
Or use something like libcurl, to save re-inventing the wheel.

Share this post


Link to post
Share on other sites
And in the event that you actually just need HTML instead of doing it through code...

<form name="input" action="http://somesite.com" method="get">
... put stuff here
</form>

changes to...

<form name="input" action="http://somesite.com" method="post">
... put stuff here
</form>

Share this post


Link to post
Share on other sites
Awesome guys, those explanations explain heaps. I didn't realise it was more or less a clear text thing.

@Darkpegasus it was the HTML way I needed, thanks. But it is good to know that it shouldn't be too hard to write a utility to do some admin tasks, rather than have a webpage to do it.

Thanks heaps everyone, i'll give that all a try.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!