Skip to content
Advertisement

How to extract data from POST request in azure functions java

I send form data in POST request from angular app to my azure functions who wrriten in java.
the client side look like this:

JavaScript

when Item recived to azure functions.
the aim of functions is to send this item in push notifications via firebase to android app.

the azure functions with HTTP trigger look like this:

JavaScript

when I am running String itemDetails = request.getBody().get(); I am getting:

——WebKitFormBoundary2gNlxQx5pqyAeDL3 Content-Disposition: form-data; ….

I will be glad to know how to get data item from that?

Advertisement

Answer

If you want to parse from-date type data in Azure function with java, you can try to use MultipartStream in SDK org.apache.commons.fileupload to implement it. For example

  1. code
JavaScript
  1. Test. I test with postman enter image description here enter image description here
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement