Skip to content

Support request service with HTTP GET with payload in query string in Rust service. #528

@metrue

Description

@metrue

Current State

HTTP POST works as expect.

$ cat payload.json
{
  "a": 1,
  "b": 1
}

$ http 0.0.0.0:52857 < payload.json
HTTP/1.1 200 OK
Content-Length: 12
Content-Type: application/json
Date: Fri, 22 May 2020 04:54:44 GMT
Server: Rocket

{
    "result": 2
}

HTTP GET: 404

./build/fx up -n rust examples/functions/Rust/func.rs

 http 0.0.0.0:52857?a=1&b=1
            <!DOCTYPE html>
            <html>
            <head>
                <meta charset="utf-8">
                <title>404 Not Found</title>
            </head>
            <body align="center">
                <div align="center">
                    <h1>404: Not Found</h1>
                    <p>The requested resource could not be found.</p>
                    <hr />
                    <small>Rocket</small>
                </div>
            </body>
            </html>

Expect

curl  curl 0.0.0.0:57089?a=1&b=1

HTTP/1.1 200 OK
Content-Length: 12
Content-Type: application/json
Date: Fri, 22 May 2020 04:54:44 GMT
Server: Rocket

{
    "result": 2
}

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions