Page 1 of 1

#XPRIM_HttpContentInfo

Posted: Sat Feb 03, 2018 11:20 am
by soa
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

Re: #XPRIM_HttpContentInfo

Posted: Mon Feb 05, 2018 4:37 pm
by tsupartono
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)

Re: #XPRIM_HttpContentInfo

Posted: Mon Feb 05, 2018 5:48 pm
by soa
Thanks for that. I was looking in the Web Services documentation - I didn't realize there was a new section in the Technical Docs.