Sign in to follow this  

'Posting' in HTML

This topic is 3719 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
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

This topic is 3719 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this