X-www-form-urlencoded with Server API Action


#1

How do I set x-www-form-urlencoded as the data-type when using the API action server side?

I do know how to do this client side, but is this also possible server side? The API we want to post to only accepts this data-type.


X-www-form-urlencoded for PUT requests
#2

Did you try a normal post, these are default using x-www-form-urlencoded. No need to set a special data-type.


#3

It’s actually a PUT not a POST. If I submit with Postman, it does work, just not with Wappler.

Settings:

Requirements from MRPeasy API:

“To update the quantity, please make a PUT request to https://app.mrpeasy.com/rest/v1/manufacturing-orders/[MO_ID] with the parameter quantity.”

Maybe this error I got when doing fetch schema is relevant?


#4

well you can’t use the schema editor to fetch the schema that requires a PUT operation.

that is why we also have a “Source” option in it.
check from their documentation the JSON that is being outputted and paste it in the “source” panel below the “fetch schema” button (need to expand it first)


#5

Well I didn’t know that :wink: I’m no API expert.

Ah I see, I was wondering what the source part was for.

The problem is that there is no JSON output at all, I don’t get any response from this particular API. But it should not matter I think, since I can do a PUT with Postman and everything works fine. Just not with Wappler. Can you explain how this is possible and how to solve it?


#6

Oh if there is no output then just open and save the schema editor to make an empty schema.


#7

I did that already, it doesn’t make a difference


#8

PUT can’t currently post the data as X-www-form-urlencoded, that is currently only possible with POST. Will see if we can add it to the other methods for one of the upcoming updates.


#9

Geez, I’m finding those missing features and bugs am I? :wink:

Hope you can implement this soon, it’s literally one of the last steps in my application. Without this a core functionality of my app doesn’t work. Thank you


#10

Hey Guys i am facing the same issue here, we need to use PUT. @George @Teodor . Any updates to this would be great, it is also a final feature required for your CRM.


#11

They did update this a few weeks back, works now on my side


split this topic #12

4 posts were split to a new topic: Can’t manually enter API Schema