Congrats on the release of the new codeless module - I’m really liking it so far, and see great potential for it!
I was trying some of the features and following the videos, and had a question around the Network API. While I was able to get requests working, is there any current way to specify HTTP headers in the HTTP/S block to build more complex requests? Or is this on the roadmap that would be coming in a new release?
Yes, we will be adding new Blocks for extend the Codeless ecosystem and the block (HTTP/s Headers) is one of those. The our main goal is make creation logic more easy and intuitive for users.
We notify you when the block is in
Thanks for the update Vlad, i’ll look forward to it!
Is there any timeline on that? Days, weeks? (Just so I can plan whether or not I should decide to leave this functionality where it currently is, instead of in codeless)
Was the (HTTP/s Headers) block ever added? I am trying this aspect and cannot find a block that is accepted by the UI builder for header. I tried creating the header from an “input” field on the “form data” but I get a response stating I have not provided the header … appreciate any help.
Thanks for your response Vlad. I am using the create object block and have tried various combinations such as below without the square brackets ofcourse
Property name set to [Authorization:] and the value set to [Bearer “MysecretKey”]
Property name set to [Authorization:] abd the value set to [Authorization: Bearer “MysecretKey”]
the above with no quotes and single quotes as well - In every instance I am getting the following error from Stripe. I want to integrate to api.stripe.com/v1/charges - I tried using the stripe integration plugin for this but it only sends 2 of my 5 required properties in the payload
Now I am getting this error
{
“error”: {
“message”: “Invalid request (check that your POST content type is application/x-www-form-urlencoded). If you have any questions, we can help at Stripe: Help & Support”,
“type”: “invalid_request_error”
}
}
Here is the java code for creating charges from stripe documentation, hope this helps?
Stripe.apiKey = “MYSECRETKEY”;
// source is obtained with Stripe.js; see Accept a payment using Stripe Elements | Stripe Documentation
Map<String, Object> params = new HashMap<>();
params.put(“amount”, 2000);
params.put(“currency”, “usd”);
params.put(“customer”, " cus_KxXXXXXXXXXXV");
params.put(“description”,“description”);
params.put(“application_fee_amoun”,20);
params.put(“destination”," acct_1KXxxXXXxXXxb")
);
I searched for it and could not find it. In actuality it should work the same way as the “stripe plugin” provided by backendless. Infact I used the API service “Stripe” with method “charge”. The problem I had with that was the payload only included the “amount” and “currency” parameters and ignored all the others I have in the form. so technically the charge object from the stripe plugin would work if it passed the entire payload to stripe. I hope I am making sense with above. I am not a coder and love backendless, I believe it can provide the solution I am looking for if the stripe integration is solved!
That is the api I am using with backendless UI builder (please see path in above picture), but I get the error as mentioned above. is my UI Builder logic not correct?
Thanks Mark! You probably get to hear this a lot “you da man!”. Nonetheless I must add myself to the list of folks saying that. I learned a lot from this exercise. My form is speaking with stripe, albeit I am now getting another error (one of my fileds although populated is getting sent as null) - I will keep working on that to see what the issue there might be, but the API works!!
The codeless function in my example doesn’t check if there is a value for a property. Perhaps a condition can be added there to check if there is a value and if not, skip the property (if it is indeed optional)