Home Identifier Source Repository
import $MimeTypeProvider from 'angie/src/util/$MimeTypeProvider.js'
public class | since 0.2.6 | source

$MimeTypeProvider

You can directly use instance of this class. $MimeTypeProvider

$MimeTypeProvider is predominately used internally to specify a properties mime type on response objects. It can also be used in special cases for routing views.

Example:

$MimeTypeProvider._('test.json'); // = 'application/json'

Static Method Summary

Static Public Methods
public static

Find a mime type based on a pathname

since 0.2.6

Static Public Methods

public static fromPath(path: string): string since 0.2.6 source

Find a mime type based on a pathname

Params:

NameTypeAttributeDescription
path string

File path to check against

Return:

string

An approximated Content-Type

Example:

$MimeTypeProvider._fromPath('test.json'); // = 'application/json'