{"action":"created","issue":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/599","repository_url":"https://api.github.com/repos/ServiceStack/Issues","labels_url":"https://api.github.com/repos/ServiceStack/Issues/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/ServiceStack/Issues/issues/599/comments","events_url":"https://api.github.com/repos/ServiceStack/Issues/issues/599/events","html_url":"https://github.com/ServiceStack/Issues/issues/599","id":297631131,"number":599,"title":"Issue with Serverless / Api Gateway / ServiceStack combination request deserialization","user":{"login":"ryanhelms","id":1596639,"avatar_url":"https://avatars2.githubusercontent.com/u/1596639?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanhelms","html_url":"https://github.com/ryanhelms","followers_url":"https://api.github.com/users/ryanhelms/followers","following_url":"https://api.github.com/users/ryanhelms/following{/other_user}","gists_url":"https://api.github.com/users/ryanhelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhelms/subscriptions","organizations_url":"https://api.github.com/users/ryanhelms/orgs","repos_url":"https://api.github.com/users/ryanhelms/repos","events_url":"https://api.github.com/users/ryanhelms/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhelms/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-15T23:14:33Z","updated_at":"2018-02-18T18:44:34Z","closed_at":"2018-02-18T01:59:25Z","author_association":"NONE","body":"Hey mythz,\r\n\r\nFirst, I have to say that this combination is very powerful when it works properly. We are able to have infinitely scalable, high-functioning ServiceStack endpoint that are just as feature rich as any other  ServiceStack endpoint deployed in a container / EC2 environment. \r\n\r\nWe have endpoints interfacing with Virtual File Systems, MQ pub/sub, etc but oddly enough, we break down when it comes to executing a POST / PUT to an endpoint and  expecting to get a deserialized request object. The object basically comes through as a new object of the request type (empty - `Payload` property in the example below) with any properties that I explicitly define in the return coming back as expected (`Ping` and `UpTime` properties in the example below). I have setup a demo solution [here](https://github.com/ryanhelms/servicestack-serverless-apigateway) for you to have a look at.\r\n\r\n**Note**: I have an example api deployed using the steps below. You can use this one if you'd like but I was verbose here in case you wanted to reproduce it yourself from the ground up. \r\n\r\nExample endpoint deployed from steps below: \r\n - https://a0pxyby83h.execute-api.us-east-2.amazonaws.com/demo/ping\r\n\r\n===================================================================\r\n\r\nThe steps to reproduce the problem are:\r\n\r\n1.  Clone the [repo](https://github.com/ryanhelms/servicestack-serverless-apigateway)\r\n\r\n2.  Open your command prompt\r\n\r\n3. `cd` to MyApp directory\r\n\r\n4.  `npm install` \r\n\r\n5. Edit MyApp -> serverless.yml\r\n    - change `<AWS_ROLE>` to an existing role\r\n    - change `<SERVERLESS_DEPLOYMENT_BUCKET>` to a temporary bucket to put serverless deployments\r\n\r\n6. From your command prompt, execute: `sls deploy --stage <anything> --region <valid_region>` \r\n\r\n7. After a successful deployment, get the endpoint url that was assigned for your service:\r\n    example: https://a0pxyby83h.execute-api.us-east-2.amazonaws.com/demo/ping\r\n\r\n8. Next, execute a GET request:\r\n    - You should get back a response similar to:\r\n>        {\r\n>            \"ping\": \"Get: Pong\",\r\n>            \"upTime\": \"Service has been up for -XX:XX:XX.XXXXXXXX\"\r\n>        }`\r\n\r\n9.  Next, execute a POST request with:\r\n    - the `Accept` header set to `application/json`\r\n    - the `Content-Type` header set to `application/x-www-form-urlencoded`\r\n    - the request property `Payload`  set to `payload data`\r\n\r\n    - You should get back a response similar to:\r\n>        {\r\n>            \"payload\": \"payload data\",\r\n>            \"ping\": \"Post: Pong\",\r\n>            \"upTime\": \"Service has been up for -XX:XX:XX.XXXXXXXX\"\r\n>        }`\r\n\r\n10.  Next, execute a POST request with:\r\n    - the `Accept` header set to `application/json`\r\n    - the `Content-Type` header set to `application/json`\r\n    - the request property `Payload`  set to `payload data`\r\n\r\n    - You should get back a response similar to:\r\n>        {\r\n>            \"ping\": \"Post: Pong\",\r\n>            \"upTime\": \"Service has been up for -XX:XX:XX.XXXXXXXX\"\r\n>        }`\r\n\r\nObviously, this is where the problem is. I expect to get back `payload: \"payload data\"`  here just as I did for the previous post.\r\n\r\nAny ideas are welcome. I'd love to get this working 100% as it has huge potential.\r\n\r\nCheers!"},"comment":{"url":"https://api.github.com/repos/ServiceStack/Issues/issues/comments/366537395","html_url":"https://github.com/ServiceStack/Issues/issues/599#issuecomment-366537395","issue_url":"https://api.github.com/repos/ServiceStack/Issues/issues/599","id":366537395,"user":{"login":"ryanhelms","id":1596639,"avatar_url":"https://avatars2.githubusercontent.com/u/1596639?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanhelms","html_url":"https://github.com/ryanhelms","followers_url":"https://api.github.com/users/ryanhelms/followers","following_url":"https://api.github.com/users/ryanhelms/following{/other_user}","gists_url":"https://api.github.com/users/ryanhelms/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhelms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhelms/subscriptions","organizations_url":"https://api.github.com/users/ryanhelms/orgs","repos_url":"https://api.github.com/users/ryanhelms/repos","events_url":"https://api.github.com/users/ryanhelms/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhelms/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T18:44:34Z","updated_at":"2018-02-18T18:44:34Z","author_association":"NONE","body":"@mythz , I mis-typed above. the Post signature is `Post(PingRequest request)`."}}
{"actor":{"display_login":"ryanhelms"}}