Skip to content

Commit 08422e6

Browse files
authored
Fix text plain decoding (#824)
* 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
1 parent b1ece84 commit 08422e6

File tree

5 files changed

+58
-4
lines changed

5 files changed

+58
-4
lines changed

design/design.go

+2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ var _ = API("arduino-create-agent", func() {
2424
such as detecting which boards are connected and upload sketches on them.`)
2525
HTTP(func() {
2626
Path("/v2")
27+
Consumes("application/json")
28+
Consumes("plain/text")
2729
})
2830
})

0 commit comments

Comments
 (0)