cancel
Showing results for 
Search instead for 
Did you mean: 

Send HTTP request as JSON format from PI to 3rd party system

Former Member
0 Kudos

Hello Experts,

I would like to know if we can send the HTTP request ( Idoc to HTTP scenario) from PI to 3rd party system using the JSON format.

Please see the sample request below that needs to be sent

curl https://URL\ ?access_token=JH5vpYs13XH7yfY7mCQ6emVa7wA=0gI1aW6Nac9b66d65475a2595d047d6962de2c789c3545a6d401c2c121692a11ce1af0c1cda654c7ebb9986a3f2485a0a9293ef7d5f09aa22b1b4b2943c10cad80cf079923cc5f25ac327cce43e3e5fdc78991102e39a503e41593013e3a13f3f94b240a \ -H "Content-Type: application/json" \ -d '{ "supplierId": "521cf822bd6d550000000021", "productId": "521cf822bd6d550000000008", "quantity": { "cases": 12 } }'

Is this achievable from PI using standard HTTP adapter or do we need custom adapter development?.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

abhay_aggarwal
Participant
0 Kudos

Hello Aravind,

Yes it is possible . In my case it is working. you can handle json in PI using gson google API's and can use http adapter.

Regards

former_member607993
Contributor
0 Kudos

Hi,

How it is possible to send Json via HTTP adapter.

Thanks and REgards - Rajesh PS

former_member190293
Active Contributor
0 Kudos

Hi Rajesh PS!

And what's wrong with HTTP? 🙂 Actually, REST is architecture based on HTTP commutication.

I have a number of interfaces sending data to REST services using HTTP adapter. In this case you just should take care of converting your payload from XML to JSON using java mapping for example. Further, in simple cases, you just set GET/PUT operation for HTTP adapter, set required headers and pass your JSON content as message body.

Regards, Evgeniy.

rhviana
Active Contributor
0 Kudos