Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-26 Thread Thusitha Thilina Dayaratne
Hi All, I started looking into implementing FormParam support for MSF4J. AFAIU we need to support below content types 1. application/x-www-form-urlencoded 2. multpart/form-data For the *application/x-www-form-urlencoded * This is pretty much similar to the QueryParam. We can read the

Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-11 Thread Samiyuru Senarathne
When I was looking into form processing in MSF4J, I was looking at modifying apache commons [1][2] to meet our needs since it has multipart support and it is widely used with servlets. But IMO we wont be able to use it directly out of the box as a library to parse the byte buffer we have because

Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-10 Thread Himasha Guruge
In C4 we have used [1] for this purpose. [1] http://cxf.apache.org/docs/jax-rs-multiparts.html On Wed, May 11, 2016 at 11:12 AM, Afkham Azeez wrote: > Any libraries you are familiar with? Since BPS folks are using the code > from the MSF4J master branch, we may be able to

Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-10 Thread Afkham Azeez
Any libraries you are familiar with? Since BPS folks are using the code from the MSF4J master branch, we may be able to quickly implement it. On Wed, May 11, 2016 at 11:09 AM, Samiyuru Senarathne wrote: > Hi Azeez, > > Yes I looked at this sometime back. But it was not

Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-10 Thread Samiyuru Senarathne
Hi Azeez, Yes I looked at this sometime back. But it was not progressed to the implementation level. For the moment we will have to use a multipart/form-data parsing library to parse the raw HTTP body. We can get the raw HTTP body by injecting an org.wso2.msf4j.Request object to the resource

Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-10 Thread Afkham Azeez
Samiyuru, You looked at this some time back right? What work is involved in implementing this? Azeez On Wed, May 11, 2016 at 11:00 AM, Himasha Guruge wrote: > From the offline discussion with Azeez, it seems that this is not > supported in current msf4j implementation. How

Re: [Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-05-10 Thread Himasha Guruge
>From the offline discussion with Azeez, it seems that this is not supported in current msf4j implementation. How are we to proceed with the use case of acquiring form field values from the request? On Wed, Apr 6, 2016 at 11:22 AM, Himasha Guruge wrote: > Hi All, > > I have

[Dev] Reading headers/form fields of a multipart/form-data request in msf4j

2016-04-05 Thread Himasha Guruge
Hi All, I have gone through the available sample [1] on how to process a stream and read and save files in msf4j. However given a request with form fields like [2] , how can we retrieve those form fields in msf4j? If it is to read from the stream itself, any suggested way to do this? [1]