question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

POST method not working.

See original GitHub issue

Hello Guys, nice work you all did !.

I have a question about the POST request:

here’s my script

import { Application, Router } from "./deps.ts";

const app = new Application({ port: 3001 });

app.get("/", (ctx) => {
  return { "hello": "world" };
});

app.post("/cadastrar", async (ctx) => {
  console.log(ctx.req);
  return ctx.req.body;
});

await app.run();

Screen Shot 2020-05-15 at 18 52 56

Postman

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Caesar2011commented, May 17, 2020

There is a racing condition. Will be fixed.

1reaction
Caesar2011commented, May 15, 2020

I am curious why a this stub cookie Middleware handler should make any difference to the body. I will investigate it further tomorrow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP $_POST not working? [duplicate] - Stack Overflow
Make sure that the "action" attribute on your form leads to the correct destination. · Try using $_REQUEST[] instead of $_POST, see if...
Read more >
How to Fix Request Method 'POST' Not Supported - Hyperping
What Are the Best Methods to Solve the Request Method' Post' Not Supported Error? · Confirm That Your Input URL Is Correct ·...
Read more >
$_POST - Manual - PHP
An associative array of variables passed to the current script via the HTTP POST method when using application/x-www-form-urlencoded or multipart/form-data ...
Read more >
Using the POST method in a PHP form - HTML Form Guide
This tutorial will cover how PHP handles form data posted via the POST method. Introduction to the form. POST data is submitted by...
Read more >
PHP - GET & POST Methods - Tutorialspoint
The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found