0

I created a simple REST on Kitura. When I run it on your Mac, it works fine. GET / POST / PUT / DELETE are executed. When I run it on bluemix, GET method works correctly, but the POST is wrong. In response to the POST I should return JSON to create an object and returns a response with the text "unknown" in the body. Then, at my request any returns "unknown". No errors in the logs there. What could it be?

Kitura version 0.15.6, swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a

TheSoundDefense
  • 6,753
  • 1
  • 30
  • 42
  • Can you reproduce this issue on Linux? Can you use the Docker or Vagrant environments on the Mac to speed up the process? This information will help us determine if the issue is specifically Bluemix-related or with Kitura on Linux, which happens to be hosted on Bluemix. Also, can you provide a code snippet? Note: I was asked to post these comments for someone that does not have enough reputation points to post a comment. – William 'Bill' Wentworth Jun 01 '16 at 20:41
  • Of course, [that my project](https://mega.nz/#!vYNEwRwQ!l3rylAZz2sYOUZfvXuZKOllaDZuv3W4QyGnW_wzyHm0). I have found that the problem is not in the `POST` request and its processing. The problem somewhere in SwiftyJSON. App.swift:39 `response.status(HTTPStatusCode.OK).send(json: json)` – Руслан Болатаев Jun 01 '16 at 20:45

1 Answers1

2

This was a bug in the Linux implementation of SwiftyJSON that incorrectly marked UInts as invalid.

I fixed this and pushed a new version: 7.0.4

This will now work once you update your dependencies.

Daniel Firsht
  • 353
  • 4
  • 10