Skip to content

REST Failure #822

@Codie-Petersen

Description

@Codie-Petersen

Problem

When using the REST route http://localhost:8888/v1/scripts POST, I get a http: request body too large.
Version: v2.2.8
OS: Windows 10

Steps to Reproduce

  1. Start emulator via cli in some existing project:
  • flow emulator start
  1. Open up your favorite REST API Tester i.e. ReqBin
  2. Enter route to test: http://localhost:8888/v1/scripts
  3. Change method from GET to POST (next to send button in ReqBin)
  4. Add body:
{
  "script": "YWNjZXNzKGFsbCkgZnVuIG1haW4oKTogU3RyaW5nIHsgcmV0dXJuICJIZWxsbywgV29ybGQhIiB9",
 "arguments": [] 
}
  1. Result will be:
{
   "code": 400,
   "message": "http: request body too large"
}

Acceptance Criteria

Emulator should return: {"value":"Hello, World!","type":"String"}

Context

I have a library that needs to connect to the emulator via a Unity C# library, since I can't do that, I have to do it via testnet. Still doable, but a pain in the ass.

I can still develop the stuff I am doing, but I can't build easily cleaned test states and have to deploy testnet contracts. I'd rather do all of the alpha testing on emulator deployments and all of the beta testing on testnet deployments. Most of the contract is actually finished, but I don't know what kind of bugs I might discover in the middle of testing, requiring me to redeploy it.

Like I said, I can still work, but I'd rather just be able to interact with an emulator that I can spin up a fake state with random interactions for unit testing.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions