zoukankan      html  css  js  c++  java
  • What are all the possible values for HTTP “Content-Type” header?

    What are all the possible values for HTTP “Content-Type” header?

    You can find every content type here: http://www.iana.org/assignments/media-types/media-types.xhtml

    The most common type are:

    1. Type application

      application/EDI-X12   
      application/EDIFACT   
      application/javascript   
      application/octet-stream   
      application/ogg   
      application/pdf  
      application/xhtml+xml   
      application/x-shockwave-flash    
      application/json  
      application/ld+json  
      application/xml   
      application/zip  
      application/x-www-form-urlencoded  
      
    2. Type audio

      audio/mpeg   
      audio/x-ms-wma   
      audio/vnd.rn-realaudio   
      audio/x-wav   
      
    3. Type image

      image/gif   
      image/jpeg   
      image/png   
      image/tiff    
      image/vnd.microsoft.icon    
      image/x-icon   
      image/vnd.djvu   
      image/svg+xml    
      
    4. Type multipart

      multipart/mixed    
      multipart/alternative   
      multipart/related (using by MHTML (HTML mail).)  
      multipart/form-data  
      
    5. Type text

      text/css    
      text/csv    
      text/html    
      text/javascript (obsolete)    
      text/plain    
      text/xml    
      
    6. Type video

      video/mpeg    
      video/mp4    
      video/quicktime    
      video/x-ms-wmv    
      video/x-msvideo    
      video/x-flv   
      video/webm   
      
    7. Type vnd :

      application/vnd.oasis.opendocument.text    
      application/vnd.oasis.opendocument.spreadsheet  
      application/vnd.oasis.opendocument.presentation   
      application/vnd.oasis.opendocument.graphics   
      application/vnd.ms-excel    
      application/vnd.openxmlformats-officedocument.spreadsheetml.sheet   
      application/vnd.ms-powerpoint    
      application/vnd.openxmlformats-officedocument.presentationml.presentation    
      application/msword   
      application/vnd.openxmlformats-officedocument.wordprocessingml.document   
      application/vnd.mozilla.xul+xml   
      

     

     https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type

    The Content-Type entity header is used to indicate the media type of the resource.

    In responses, a Content-Type header tells the client what the content type of the returned content actually is. Browsers will do MIME sniffing in some cases and will not necessarily follow the value of this header; to prevent this behavior, the header X-Content-Type-Options can be set to nosniff.

    In requests, (such as POST or PUT), the client tells the server what type of data is actually sent.

    It also needs to have a MIME type of its parsed value (ignoring parameters) of either application/x-www-form-urlencoded, multipart/form-data, or text/plain.

  • 相关阅读:
    day66
    1
    day65
    BeautifulSoup
    day60
    day59
    day49
    day48
    [S5PV210] PWM
    [S5PV210] Clock
  • 原文地址:https://www.cnblogs.com/chucklu/p/11725314.html
Copyright © 2011-2022 走看看