[Redirect and Post] Sending JSON object as a parameter

Forge Component
(1)
Published on 20 Mar by André Alho
1 vote
Published on 20 Mar by André Alho

Hi All,

I'm trying to use this module to send a JSON object to an external URL as a parameter. Can somebody please tell me how I could change the parameter type to a JSON object.

Thanks in advance,

Shruthi


JSON is usually serialized text. You should use the JSONSerlialize server widget to achieve this.

The input parameter is the object to convert to JSON, and then you would use the Output as the value for your parameter.

Hanno wrote:

JSON is usually serialized text. You should use the JSONSerlialize server widget to achieve this.

The input parameter is the object to convert to JSON, and then you would use the Output as the value for your parameter.


Thank you so much Hanno, I have now converted my JSON object to a string. But this module accepts parameters of a structure type named PostParameter only. 

Is there any way I could change this type?

Also an off topic question, what changes should I make in the website I'm redirecting to using the URL to receive this JSON string?

Solution

Shruthi Madhavan wrote:

Is there any way I could change this type?

I don't think it would make sense to change the extension? It serves a purpose. I think there is an alternative that you could consider in the HttpRequestHandler - PostRequest_Submit action.

Also an off topic question, what changes should I make in the website I'm redirecting to using the URL to receive this JSON string?

This is a little vague for me to make a proper comment on. Can you share more of the website you are redirecting to?

Solution

Hanno wrote:

Shruthi Madhavan wrote:

Is there any way I could change this type?

I don't think it would make sense to change the extension? It serves a purpose. I think there is an alternative that you could consider in the HttpRequestHandler - PostRequest_Submit action.

Also an off topic question, what changes should I make in the website I'm redirecting to using the URL to receive this JSON string?

This is a little vague for me to make a proper comment on. Can you share more of the website you are redirecting to?

Thank you Hanno, 

The website I'm redirecting to is a flowchart maker and with the JSON string I'm sending will display a flowchart.I do not have a clear idea of how to receive the JSON I'm posting in this website.