Search found 3 matches

by PoojaSingh
Tue Dec 07, 2021 11:43 am
Forum: Questions & Answers
Topic: Using POST method to send XML file to the WebAPI
Replies: 0
Views: 54995

Using POST method to send XML file to the WebAPI

Hi,

I am trying to send xml file in the form of multipart/form-data to the web api.
But it seems if i do not specify content-type header explicitly within Lansa, httprequest takes "application/octet-stream" content type on its own and server rejects to accept my request since it is expecting ...
by PoojaSingh
Tue Dec 07, 2021 11:22 am
Forum: Questions & Answers
Topic: using #PRIM_JSON.Document to save json request and response data
Replies: 2
Views: 17862

Re: using #PRIM_JSON.Document to save json request and response data

Hi Dominik,

I apologize for this late reply.

Thank you very much for your help. It is greatly appreciated.

Below is the snippet I used to save json as a file

#Filename := *DD_XML_PATH + '\' + #Filename
#DocWriter.SetOutputToFile Path(#Filename)
#DocWriter.BeginObject
#DocWriter.WriteString Name ...
by PoojaSingh
Mon Aug 16, 2021 9:15 pm
Forum: Questions & Answers
Topic: using #PRIM_JSON.Document to save json request and response data
Replies: 2
Views: 17862

using #PRIM_JSON.Document to save json request and response data

Hi,

I am looking for more information about #PRIM_JSON.Document, more specifically about its SaveToFile feature.
I need to store request being sent to API and response coming back from API in a JSON format file. Currently both the request and response data is in the form of #PRIM_DC.Unicode string ...