# How to enforce “accept” OR “ format” parameters in HTTP URL to enforce XML response from server than a JSON

**URL:** <https://community.postman.com/t/how-to-enforce-accept-or-format-parameters-in-http-url-to-enforce-xml-response-from-server-than-a-json/17292>\
**Category:** Help Hub\
**Created:** [November 1, 2020, 5:36pm UTC](https://community.postman.com/t/how-to-enforce-accept-or-format-parameters-in-http-url-to-enforce-xml-response-from-server-than-a-json/17292 "2020-11-01T17:36:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shurajne](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@shurajne](https://community.postman.com/u/shurajne)\
**Post date:** [November 1, 2020, 5:36pm UTC](https://community.postman.com/t/how-to-enforce-accept-or-format-parameters-in-http-url-to-enforce-xml-response-from-server-than-a-json/17292/1 "2020-11-01T17:36:21Z")

</div>

I am always getting JSON response for my HTTP request to access one ORDS-Oracle Rest Data Services API: **[http://localhost:8080/ords/hr/employees/](http://localhost:8080/ords/hr/employees/)** [![enter image description here](https://us1.discourse-cdn.com/getpostman/original/3X/1/7/175e26a988a25ab28f724700bd0c36e7868e8c04.png)](https://i.stack.imgur.com/PBDzI.png)

However my requirement is to get XML response. I tried to choose XML from drop down list available at POSTMAN, however content is not changing to XML.  
I need a way to specify parameter as part of HTTP URL so that response is XML than JSON and I tried to change URL like below: Way1: **[http://localhost:8080/ords/hr/employees?format=xml](http://localhost:8080/ords/hr/employees?format=xml)** Way2: **[http://abcdef.us.oracle.com:8001/claims-ws/api/generic/lineofbusinesses/421?Content-Type:application/xml](http://abcdef.us.oracle.com:8001/claims-ws/api/generic/lineofbusinesses/421?Content-Type:application/xml)** Way3: **[http://abcdfef.us.oracle.com:8001/claims-ws/api/generic/lineofbusinesses/421?Accept:application/xml](http://abcdfef.us.oracle.com:8001/claims-ws/api/generic/lineofbusinesses/421?Accept:application/xml)**  
However nothing is working and response is always JSON. Any suggestion?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [November 1, 2020, 6:27pm UTC](https://community.postman.com/t/how-to-enforce-accept-or-format-parameters-in-http-url-to-enforce-xml-response-from-server-than-a-json/17292/2 "2020-11-01T18:27:23Z")

</div>

Hey @shurajne

Do you know that the API returns an XML response? If it has not been implemented, it wouldn’t ever return that.

Changing the options on the Postman side wouldn’t automatically change the structure of the payload, unless it’s been designed to do that.

What can you tell us about the API - It looks like you’re running that locally…have you take this code from somewhere else and are just trying things out?
