Forum Discussion

gabiudrea's avatar
gabiudrea
Helper
12 years ago

endpoins - View Content Type

Hello,

 

I'm trying to understand how the "View content type" works for an endpoint

I'm trying to get pure text, so I'm using text/plain from the dropdown, unfortunately I still see html code rendering.

 

Just type some text in an endpoint then see how it looks like using the different options.

 

Here someone asked for something similar before:

https://lithosphere.lithium.com/t5/developers-discussion/Completely-blank-layout/m-p/23452

 

Am I doing it right?

 

Thanks!

3 Replies

  • YuriK's avatar
    YuriK
    Khoros Expert
    12 years ago

    Hey gabiudrea,

     

    What browser are you using? Selecting the "View content type" sets the Content-Type header in the response. The browser should display the content in the type specified by the Content-Type header.

     

    I did the following quick test in chrome:

     

    1.  Put the following code in an endpoint
    <html>
    <body>
    <h1>4 The Content-Type Header Field</h1>
    </body>
    </html>

     2. set content type to text/html (click save) (then click to view endpoint)

      • This showed just the header content

     3. set content type to text/plain (click save) (then click to view endpoint)

      • This showed the full text

     

    Hope this helps,

     

    Yuri