Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

使用helloworld传参的时候,云函数获得的参数有误 #4

Open

Description

执行

scf init

之后一路选择helloworld调试,然后使用postman通过POST方法向http://localhost:3000/发送了如下数据:

{
	"method": "search",
	"param": {
	 "word": "withhold"
	}
}

在代码中直接返回event,然而返回的却是:

{
 "returnObj": {
 "key1": "test value 1",
 "key2": "test value 2"
 }
}

在github上搜索test value之后,截图:
image
另外,使用http方式,可以获取到正确的body,但是这种方式和小程序调用的又不一样。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /