#XPRIM_HttpContentInfo

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
soa
Posts: 289
Joined: Mon Dec 07, 2015 3:15 pm

#XPRIM_HttpContentInfo

Post by soa » Sat Feb 03, 2018 11:20 am

I'm trying use AddFile on HTTPRequest but I can't find any documentation on this operation, particularly HttpContentInfo. Has anybody got any examples or info on the parameters of this object?

Cheers
Jim

tsupartono
Posts: 74
Joined: Wed Jan 25, 2017 11:12 am

Re: #XPRIM_HttpContentInfo

Post by tsupartono » Mon Feb 05, 2018 4:37 pm

Hi Jim,
The documentation page for AddFile can be found in the LANSA Technical Reference.
Here is the link to the section:

http://docs.lansa.com/14/en/lansa015/in ... 0_0260.htm

The ContentInfo parameter is optional, so you don't have to specify it if you don't need to.

Also - if the request is not multipart (ie it contains just the one file), you can set the content type using the Content property.
For example, the code below sets the request's content type to PDF.

Code: Select all

#Request.Content.ContentInfo.MediaType := 'application/pdf'
#Request.Content.AddFile Path(#PathToPDF)

soa
Posts: 289
Joined: Mon Dec 07, 2015 3:15 pm

Re: #XPRIM_HttpContentInfo

Post by soa » Mon Feb 05, 2018 5:48 pm

Thanks for that. I was looking in the Web Services documentation - I didn't realize there was a new section in the Technical Docs.

Post Reply