request.mimeType()

request.mimeType([type])

If type is specified, sets the request mime type to the specified value and returns this request instance. If type is null, clears the current mime type (if any) instead. If type is not specified, returns the current mime type, which defaults to null. The mime type is used to both set the "Accept" request header and for overrideMimeType, where supported.

The request mime type can only be modified before the request is sent. Therefore, you cannot pass a callback to the request constructor if you wish to override the mime type; use request.get or similar instead. For example:

d3.request(url)
    .mimeType("text/csv")
    .get(callback);
doc_D3_Js
2016-11-24 10:28:46
Comments
Leave a Comment

Please login to continue.