narek adonts Well-Known Member Licensed User Longtime User Sep 4, 2015 #1 Hi, With HttpJob I am able to send Multipart and receive it with B4J jServer getMultipartData. I want to response also with MultiPartData. How can I achieve this? Narek
Hi, With HttpJob I am able to send Multipart and receive it with B4J jServer getMultipartData. I want to response also with MultiPartData. How can I achieve this? Narek
Erel B4X founder Staff member Licensed User Longtime User Sep 6, 2015 #2 Why do you want to use this format for the server response? You can manually implement it like done in the client size. Upvote 0
Why do you want to use this format for the server response? You can manually implement it like done in the client size.
narek adonts Well-Known Member Licensed User Longtime User Sep 6, 2015 #3 I am using jServer as a server for my social networking app instead of using TCP server. In server side there is a Part object which is absent in Client side. Upvote 0
I am using jServer as a server for my social networking app instead of using TCP server. In server side there is a Part object which is absent in Client side.
Erel B4X founder Staff member Licensed User Longtime User Sep 6, 2015 #4 I don't recommend you to use this format unless you must (for example if you want to support file uploads from a browser). There are many simpler and more efficient protocols. You can use JSON for example. Upvote 0
I don't recommend you to use this format unless you must (for example if you want to support file uploads from a browser). There are many simpler and more efficient protocols. You can use JSON for example.
narek adonts Well-Known Member Licensed User Longtime User Sep 6, 2015 #5 I am sending files from iOS to Jetty and versa with some parameters so its done easely with postmultipart. Why you dont recomend? Is there a performance issue? Upvote 0
I am sending files from iOS to Jetty and versa with some parameters so its done easely with postmultipart. Why you dont recomend? Is there a performance issue?
Erel B4X founder Staff member Licensed User Longtime User Sep 6, 2015 #6 If the files are small then performance will be fine. Multipart requests are less efficient as the file is encoded as base 64 string. I would instead create a simple handler that receives the file as the POST payload and sends any required parameters in the URL. See this example: https://www.b4x.com/android/forum/t...r-b4j-server-over-the-internet.37201/#content Upvote 0
If the files are small then performance will be fine. Multipart requests are less efficient as the file is encoded as base 64 string. I would instead create a simple handler that receives the file as the POST payload and sends any required parameters in the URL. See this example: https://www.b4x.com/android/forum/t...r-b4j-server-over-the-internet.37201/#content