(schema: Schema.Top, encoding: HttpApiSchema.ResponseEncoding)
| 1730 | } |
| 1731 | |
| 1732 | function applyResponseEncoding(schema: Schema.Top, encoding: HttpApiSchema.ResponseEncoding): Schema.Top { |
| 1733 | switch (encoding._tag) { |
| 1734 | case "Json": |
| 1735 | return Schema.toCodecJson(schema) |
| 1736 | case "FormUrlEncoded": |
| 1737 | return Schema.toCodecStringTree(schema) |
| 1738 | case "Text": |
| 1739 | case "Uint8Array": |
| 1740 | return schema |
| 1741 | } |
| 1742 | } |
| 1743 | |
| 1744 | function transformPayload(schema: Schema.Top, method: HttpMethod): Schema.Top { |
| 1745 | if (!hasBody(method)) return toCodecHttpProperties(schema) |
no test coverage detected