carlomagazoni How do I cheat? Reputation: 0
Joined: 01 Jan 2022 Posts: 3
|
Posted: Sat Jan 01, 2022 6:38 pm Post subject: Request body of POST |
|
|
Hello, everyone. I am coding a feature which should read/write something to Google Sheet table, I managed to make a simple GET request and get desired values, now I stuck in POST request. It requires some body of request.
It's example from "Test API" funtion in google sheets api documentation
Code: |
curl --request PUT \
'...spreadsheets/1NOZbjApvdpIpPRXUAQr6nRAnQuBMi5Zs452RhljDmzA/values/K9?valueInputOption=RAW&key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"values":[[1]]}' \
--compressed
|
Looking at celua.txt there is postURL(url, encodeddata) function. So the question is: how to create body of request in lua to make it works?
I have already searched for solution on forum and internet with no success(
|
|