function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AkiTAkiT 

HTTP Response Class use with Visualforce page

Can you render http response as content for VF page?

 

Trying to achieve Basic authentication on a site using HTTP class e.g. https://www.site.net, and then show the resulted html response in the VF page...

Ron HessRon Hess

the simple answer is yes, you can.

 

you may want to parse the response string, then wrap or format the actual response, this is done in the apex class, and then exposed to the page using a getter or property.

 

i think this is done by the RSS feed component on CodeShare  , in which a response is pulled into apex as rss atom and parsed and then displayed as a table on a Visualforce page.

AkiTAkiT

Thanks Ron,

I see, thanks for the example! I was thinking if someway possible w/o parsing content in apex class as I'd like to allow the other site show independently - think I'll need to look other authentication methods to get there.