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.

Submitting a payload with a get request results in request termination error

See original GitHub issue

image

Issue

Submitting a payload with a get request results in request termination error

Setup:

  • Deno Version: 1.1.3
  • v8 Version: 8.5.216
  • Typescript Version: 3.9.2
  • SuperDeno Version: 1.5.1

Please replace this line with a short description of the issue.

Details

        await superdeno("http://localhost:8080/api")
        .get("/endpoint/")
        .send({
            "name": "asset X",
            "thingType": "truck-asset-type"
        })
       .expect(200);

results in the error above. It seems like superdeno doesn’t support sending payloads with a get request?

Submitting a payload with a GET request is appropriate in this case as there’ll be no side effect to the API. The body is essentially a DSL to help filter the response.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
viztasticcommented, Jul 4, 2020

PS: I’ve switched my implementation to just use query params for now (turns out Angular doesn’t support get payloads either). Sharing this so you’re not feeling any pressure to fast track this. Although I do think it’ll be nice to include for completeness at some stage.

1reaction
viztasticcommented, Jul 4, 2020

Hey sorry i mindlessly put that there without realising how it came across. I actually renamed the real API endpoints for clarity more than anything but created confusion in the process. Fixed it in the original post ^

fetch worked perfectly, below is a screenshot incase you want a sense of how I implemented it:

image

also just so you know testWithFreshDb({ name: ... is just a wrapper around Deno.test with a database setup/tear-down. Shouldn’t get in the way of superdeno but happy to share if you’d like to be sure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Submitting a payload with a get request results in ... - GitHub
Issue Submitting a payload with a get request results in request termination error Setup: Deno Version: 1.1.3 v8 Version: 8.5.216 Typescript ...
Read more >
Getting "Error sending HTTP request" when sending request ...
This error indicates that the request has been successfully sent from the Mule Application, but the http response timeout occurred before the http...
Read more >
Golang http request results in EOF errors when making ...
The problem here occurs when you initiate another request before the readLoop actually detects the close, and the EOF that it reads get...
Read more >
Issue when using REST to submit to string field
Solution. The text submitted in the REST message must be correctly terminated. Use a "\n" in place of the actual carriage return. Please...
Read more >
PUT - HTTP - MDN Web Docs
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
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