How do i post with a body and query parameters?

Product: PowerShell Universal
Version: 3.5.5

Does anyone know how to post with a query parameter and a body?

Server:

New-PSUEndpoint -Url '/user' -Method Post -Endpoint {
    param($serverName)

    write-Host $serverName
    write-host $body #this is blank
}

Client

Invoke-RestMethod http://localhost:5000/user?ServerName=sandbox123.domainname.com -Method Post -Body "{'username': 'adam'}" #error 400

Workaround

remove param(*)

Try including the content type. That worked for me.

 Invoke-RestMethod http://localhost:5000/test?ServerName=sandbox123.domainname.com -Method Post -Body "{'username': 'adam'}" -ContentType 'application/json'

/facepalm, thanks.