| Output Param Value | Accept Header | Callback | Output Format |
|---|
| json | application/javascript | {valid javascript identifier} | JSONP with mime-type application/javascript |
| {NOT json, e.g., xml} | application/javascript | {valid javascript identifier} | XML format depending on the query type - see Output Formats section above. (Because output overrides the Accept header and callback) |
| {NOT json, e.g., xml} | | {valid javascript identifier} | XML format (the output parameter is not json so the callback value is ignored} |
| json | */* | {valid javascript identifier} | JSONP with mime-type application/javascript |
| */* | {valid javascript identifier} | JSONP with mime-type application/javascript |
| | | {valid javascript identifier} | JSONP with mime-type application/javascript ("If no Accept header field is present, then it is assumed that the client accept all media types") |
| | | {Invalid callback - not a valid javascript identifier} | Error Response (HTTP Bad Request) ("If no Accept header field is present, then it is assumed that the client accept all media types")
|
| json | | {valid javascript identifier} | JSONP with mime-type application/javascript |
| application/javascript | {valid javascript identifier} | JSONP with mime-type application/javascript |
| json | | | JSON format (see table in Output Formats section above). This is the case if callback is either empty or doesn't exist. |
| | Is set e.g., application/xml (NOT application/javascript OR */* OR no header) | {valid javascript identifier} | XML format depending on the query type - see Output Formats section above. (Because no output parameter is set and the Accept header does not include javascript.) |
| | | | XML format (No output or accept header or callback (or callback parameter exists but value is empty)) |
| json | | {Invalid callback - not a valid javascript identifier} | Error Response (HTTP Bad Request) |
| {output set but not supported} | | {valid javascript identifier} | Error Response (HTTP Bad Request} |
| | application/javascript | | Error Response (HTTP Bad Request} Because there is no callback parameter value set. |
| | application/javascript | {Invalid callback - not a valid javascript identifier} | Error Response (HTTP Bad Request) |
| */* | {Invalid callback - not a valid javascript identifier} | Error Response (HTTP Bad Request) |
| | */* | {callback parameter exists in querystring but is empty} | XML format - as there is no output parameter and this is the default format to return. |
| | application/javascript, */* | | XML format - as */* exists in the headers then will return the default XML format |