Announcement

Collapse
No announcement yet.

HTTP.request - how i can use it ? or any other function to communicate with server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP.request - how i can use it ? or any other function to communicate with server

    hello friends
    i want the app comunicate to my server ( web api ) but with authentifications. so i must to send some values to the server
    . i want to know wich plugin or library to use HTTP.request or any other function to send this values to the server.

    thanks


    local data = {
    grant_type = "password",
    username = "[email protected]",
    password = "3223"
    }

    local response = HTTP.request {
    method = "POST",
    headers= {["Content-Type"]="application/x-www-form-urlencoded"},
    url = 'http://40.122.75.151/api',
    data = data
    }

    local token = json.parse(response.content)
Working...
X