Zhong Liu
Posts: 0
Joined: Tue Jun 17, 2014 3:27 am

how to define a rest service that post multipart data

Hello,
I need access to a third party web service which accepting multipart form data, how do I define this service using create rest service. in setting tab, what option should I choose for "data type" and "content type"? If the url is for upload a file, what parameters should I give for the request. If possible, please give me an example. Thank you.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

how to define a rest service that post multipart data

Hi Zhong Liu,

This depends to your service settings that you are trying to connect, you should check this in their documentation.

If you needed a custom setting for your service, then the Generic service is the way for you, more information you can find here:
:: http://devcenter.appery.io/documentat...

Zhong Liu
Posts: 0
Joined: Tue Jun 17, 2014 3:27 am

how to define a rest service that post multipart data

Hi IIIya,
I defined a rest service, and add a datasource on the page like this:

Image

then I put a piece of js code on 'click' event of a button like this:

Image

when I test the app by launch and click the button, the rest service can be called and run successfully, the request parameter can be passed to the rest service.

However, when I define a rest service which is used to upload an image file, the server need a multipart-form data like this:

Image

I don't know how to pass this kind of data to service when calling service_name.execute(); could you please give me your suggestion, thank you!

Return to “Issues”