Cache REST

What are the differenent format handles the data from Rest services?

Vote up!
Vote down!

Rating: 0

Comments: 1 Views: 109

Comments

Not sure what you are asking? Since you implement the handling method for REST services, you can handle any format?
-Fab

Vote up!
Vote down!

Rating: 1

1 answer

Answer

Perhaps you are referring to the ContentType response header which is used by many applications to know what format the response is in.  In one of my RESTful services that returns a JSON response I use the following code in my REST handler.

    Set %response.ContentType="application/json"

You can find a list of all of the various MIME types that could be used as the %response.ContentType

https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types

 

Vote up!
Vote down!

Rating: 0

Log in to answer