Calling api using post method-web component

Hello Koders,

I would like to know why my HTTP post is not being completed.

Below are the screenshots:

2

3

The .aia of the project.
webtest.aia (3.3 KB)

I have searched all over and there is no where HTTP post is discussed in details.

Hope to have this solved.

Thanks.

@Kodular kindly help.

Your block are wrong

Hello @gopi,

Can you help me out.

Regards

Wait let me give you correct block

Hello @gopi,

Thanks in advance, I’ll be waiting.

Regards

Working aia
webtest (1).aia (450 Bytes)

webtest (1).aia (450 Bytes)

Hello @gopi,

The .aia is not importing. Would you provide the screenshots?

I can see it has worked. The airtime was sent to that specified number.

Regards.

@Collins_Kathuli rename that aia and try

@Collins_Kathuli

This is working blocks

3 Likes

Hello @gopi,

Thank you very very much for the Help! You’ve really saved a lot.

Thanks

1 Like

@Collins_Kathuli you’re welcome

1 Like

@gopi check your Message inbox kindly.

Hello @gopi,

Concerning the help you gave me sometime back, I also need some further assistance.

Here is the body:

{
“username”:“your_username”,
“productName”:“your_product_name”,
“phoneNumber”:"+254…",
“currencyCode”:“KES”,
“providerChannel”:“this_is_an_optional_field”,
“amount”: 10.00,
“metadata” : {
“shopId” : “”,
“itemId” : “”
}
}

These are the blocks I had tried to call:

Capture

I will appreciate your help.

Thank and regards.

Looking forward to hearing from you.

Check and confirm

What are you trying to do?

To call that API end point. Its a Mobile Checkout, with postman its working but here at Kodular not working.

What response code and error you get?

The followinfg error:

The request content was malformed: Unexpected character “u” at input index 1 (line 1, position 2) expected JSON