HttpPost (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Camoy
fixed
>LocalChum
No edit summary
 
(24 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Locked}}
{{Locked}}
<onlyinclude>{{Method|name = HttpPost
<onlyinclude>{{Method
|arguments = [[string]] '''URI'''
|name = HttpPost
|returns = [[string]] ''request body''
|arguments = [[string]] ''url'', [[string]] ''data'', [[bool]] ''synchronous'' = false
|description = Retrieves HTML of the URI via post variable method.
|returns = [[string]] ''response''
|object = [[DataModel]]
|description = Sends data over a URI via HTML post method.
|object = DataModel
|protected = yes
}}</onlyinclude>
}}</onlyinclude>
{{clear floats}}
{{Example|
-- Correct security context will allow you to post variables to an HTML document.
game:HttpPost("<nowiki>ht</nowiki>tp://somesite/", "ThisIsTheDataThatIsPOSTed"); -->  However, in Roblox, only external code can do this type of data POSTing, so you will get an error saying "s HttpPost"
}}
[[Category:Methods]]
[[Category:Methods]]

Latest revision as of 23:03, 9 August 2011

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


Example
-- 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"