How to set the wepapi body

hi,@albert

i want to use the webapi,but how to set the body parameter,i check the docs,include the query parameters and the headers,but how to set all it,use list or text?please give me a example.

thank you!

1 Like

MiuMiu,

Congrats, you’ve discovered a bug! Currently we don’t provide blocks to set headers and query parameters. You can, however, set them in the property editor (in the Properties tab for your Web API component), although that doesn’t help you if you want to set them dynamically in your app.

A workaround to set the query parameters is to append them to your URL using the [set URL] block.

I hope this helps, and we’ll work on fixing that bug!

-Mark

P.S. I’m sorry I’m not Albert :cry:

3 Likes

hi,mark,

thanks for your detail reply!

and hope you can fixed this bug.

1 Like

You’re welcome, MiuMiu!

Are you currently blocked by this bug or can you work around it for your project using either the static properties or by appending to the URL string? If you are blocked, may I ask which of the properties you need to set for your project?

-Mark

1 Like

i understand your means,perhaps it is not a bug,no require fix it,i will test…

thank you!

hi,mark,

i find a bug about setting of url and body,if i donot set them in the property editor ,dynamic set the url or body,cannot right now do the get or post funciton,must be in other event .

please see the below pics,the first pic work fine(click the bt3 then click the bt6),the second pic not work(only click the bt3),must be clicked twice.

maybe after set the url and body,require some delay time…

first pic(ok):

second pic(first click no work,then click is ok) :

1 Like

Congratulations again, MiuMiu. You’ve found another bug! This one we just came across ourselves yesterday. It appears to do with how we implemented the Button component. We’re working on coming up with a fix.

-Mark

1 Like