sudokuserver-acid-dragons-1 created by GitHub Classroom
1
stars
1
forks
source link
PUT request gives response of "Ensure that you pass an integer in the request body" despite correct passing of value in HTTP request #34
Closed
konjo0567 closed 3 years ago
How I got this issue:
First. I spooled up a server of the current version of this code under the URL: "https://codermerlin.com/vapor/jean-martin-vaneskahian"
Second, I successfully executed a POST request against the API to get an ID for the game. the ID was : "5771082358054111728".
Third, I got the ID and formed the PUT URL, as "https://codermerlin.com/vapor/jean-martin-vaneskahian/games/5771082358054111728/cells/0/0". I also referenced this website: "https://johncodeos.com/how-to-make-post-get-update-and-delete-requests-with-urlsession-using-swift/" for the adding of the HTML body, to store the JSON input.
Finally I executed the code and it gave me the response of "Ensure that you pass an integer in the request body".
The code used to send this PUT request is listed below. (code is codey-looking) (Please tell me if you find any errors that is on my end)