Changeset 4439
- Timestamp:
- 01/14/08 18:19:28 (7 months ago)
- Files:
-
- 1 modified
-
trunk/jquery/src/ajax.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/ajax.js
r4359 r4439 147 147 data: null, 148 148 username: null, 149 password: null 149 password: null, 150 accepts: { 151 xml: "application/xml, text/xml", 152 html: "text/html", 153 script: "text/javascript, application/javascript", 154 json: "application/json, text/javascript", 155 text: "text/plain", 156 default: "*/*" 157 } 150 158 }, 151 159 … … 276 284 // Set header so the called script knows that it's an XMLHttpRequest 277 285 xml.setRequestHeader("X-Requested-With", "XMLHttpRequest"); 286 287 // Set the Accepts header for the server, depending on the dataType 288 xml.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ? 289 s.accepts[ s.dataType ] + ", */*" : 290 s.accepts.default ); 278 291 } catch(e){} 279 292