Added json encoded body to http requests

This commit is contained in:
Samuel Williams 2020-04-11 01:04:51 +01:00
parent fde331efa6
commit fedec45796

View File

@ -86,6 +86,9 @@ function NP.http.requestIndef( method, url, overrides )
table.Merge( struct, overrides )
struct.headers.Authorization = overrides.authToken
if struct.parameters then
struct.body = util.TableToJSON( struct.parameters )
end
HTTP( struct )