HttpPost (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
No edit summary
>Blocco
No edit summary
Line 11: Line 11:


{{Example|
{{Example|
If using the [[Command Bar]] or a [[CoreScript]]...<pre>
{{CodeExample}}
print( game:HttpPost( "http://www.roblox.com/User.aspx?ID=4812582" ) ) --> s HttpPost</pre>
-- Correct security context will allow you to post variables to an HTML document.
If using a [[Script]] or a [[LocalScript]]...<pre>
game:HttpPost("http://somesite/", "ThisIsTheDataThatIsPOSTed"); --> However, in Roblox, only external code can do this type of data POSTing, so you will get an error saying "s HttpPost"
print( game:HttpPost( "http://www.roblox.com/User.aspx?ID=4812582" ) ) --> s HttpPost
</pre>}}
</pre>}}


[[Category:Methods]]
[[Category:Methods]]

Revision as of 18:33, 31 December 2010

Protected:This item is protected. Attempting to use it in a Script or LocalScript will cause an error.
HttpPost( string URI )
Returns string request body
Description: Sends data over a URI via HTML post method.
Member of: DataModel


Example

Template:CodeExample -- Correct security context will allow you to post variables to an HTML document. game:HttpPost("http://somesite/", "ThisIsTheDataThatIsPOSTed"); --> However, in Roblox, only external code can do this type of data POSTing, so you will get an error saying "s HttpPost"