# Serverless-offline httpApi / post not working / but works on deployed version deployed

**URL:** <https://forum.serverless.com/t/serverless-offline-httpapi-post-not-working-but-works-on-deployed-version-deployed/13824>\
**Category:** Serverless Framework\
**Tags:** api-gateway\
**Created:** [January 21, 2021, 12:58pm UTC](https://forum.serverless.com/t/serverless-offline-httpapi-post-not-working-but-works-on-deployed-version-deployed/13824 "2021-01-21T12:58:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geertschneider](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/geertschneider/32/5114_2.png) [@geertschneider](https://forum.serverless.com/u/geertschneider)\
**Post date:** [January 21, 2021, 12:58pm UTC](https://forum.serverless.com/t/serverless-offline-httpapi-post-not-working-but-works-on-deployed-version-deployed/13824/1 "2021-01-21T12:58:46Z")

</div>

Hi

I’m having a very basic (hello-world-style) application where I have a GET/POST on a specific path (see code bellow).  
The GET seems to work as expected / the POST is never reaching my code (I think).  
I use postman to check the results of the lambda function.  
If I deploy the lambda - and execute the same postman-requests on the deployed version - it does work.

I wrote a log message when my code gets called - If I do the test through sls offline - this log message only appears after I do a GET request.  
If I start offline (sls offline) and do a POST request in postman - this log-message never appears.

```
 Operating System: win32
 Node Version: 15.5.0
 Framework Version: 2.18.0 (local)
 Plugin Version: 4.4.2
 SDK Version: 2.3.2
Components Version: 3.4.6

```

**Code (index.ts)**  
const serverless = require(‘serverless-http’);

import AWS from ‘aws-sdk’;

import express from ‘express’;

import bodyParser from ‘body-parser’

var dynamodb = require(‘serverless-dynamodb-client’);

const app = express()

app.use(bodyParser.urlencoded({ extended: true }));

app.use(bodyParser.json());

app.use(bodyParser.raw());

console.log(‘setting up express’)

app.get(’/test’, (req, res) =\> {

console.log(‘in GET’)

res.send(‘Get Hello World!’)

})

app.post(’/test’, (req, res) =\> {

console.log(‘in POST’)

res.send(‘Post Hello World!’).end()

})

module.exports.handler = serverless(app);

**The serverless.yml**  
service: surveybackend

org: vazg

provider:

name: aws

runtime: nodejs12.x

stage: dev

region: us-east-1

functions:

app:

```
handler: index.handler

events:

  - httpApi:

      method: '*'

      path: '/{proxy+}'
```

---

<div class="post-metadata">

**Author:** ![THE1ADI](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@THE1ADI](https://forum.serverless.com/u/THE1ADI)\
**Post date:** [February 3, 2021, 1:48am UTC](https://forum.serverless.com/t/serverless-offline-httpapi-post-not-working-but-works-on-deployed-version-deployed/13824/2 "2021-02-03T01:48:26Z")

</div>

I am also facing this issue. Has anyone been able to figure out what the cause is?

---

<div class="post-metadata">

**Author:** ![kenberkeley](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kenberkeley/32/5422_2.png) [@kenberkeley](https://forum.serverless.com/u/kenberkeley)\
**Post date:** [March 25, 2021, 7:00pm UTC](https://forum.serverless.com/t/serverless-offline-httpapi-post-not-working-but-works-on-deployed-version-deployed/13824/3 "2021-03-25T19:00:54Z")

</div>

Culprit found! [POST request hanging · Issue #1150 · dherault/serverless-offline · GitHub](https://github.com/dherault/serverless-offline/issues/1150#issuecomment-750866436)
