Skip to content

Commit

Permalink
Fix text plain decoding (#824)
Browse files Browse the repository at this point in the history
* test if the request with "text/plain" content type is parsed correctly

* add information on what Content-Type has to be used

this is only a cosmetic change

* use a CustomRequestDecoder to handle properly the misbehaving requests of the Web Editor
The requests sent uses `text/plain` Content-Type when they should be using `application/json`
This commit restores the old behavior, using always a json Decoder
  • Loading branch information
umbynos authored Sep 5, 2023
1 parent b1ece84 commit 08422e6
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 4 deletions.
2 changes: 2 additions & 0 deletions design/design.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ var _ = API("arduino-create-agent", func() {
such as detecting which boards are connected and upload sketches on them.`)
HTTP(func() {
Path("/v2")
Consumes("application/json")
Consumes("plain/text")
})
})
Loading

0 comments on commit 08422e6

Please sign in to comment.