Octet Stream Encoding
Have to deal with Base64 format? Then this tool is made for you! Use the super simple online form below to decode or encode your data.
application/octet-stream |
MIME Type: application/octet-stream |
MIME Content Type:Application |
Associated File Extensions:pkg files, lha files, lzh files, bin files, lrf files, mar files, class files, dylib files, elc files, so files, dmg files, dms files, bpk files, exe files, pgp files, ani files, dll files, deploy files, dist files, distz files, dump files |
Any general, binary format that the server doesn't recognize usually uses this MIME type. Upon receiving this type, most browsers prompt the user and give the user an option to save to disk. RFC1521, Borenstein |
Compatible with Windows 10, 8, 7, Vista, XP and 2000
Optional Offer for WinThruster by Solvusoft EULA Privacy Policy Terms Uninstall
What Are MIME Types?
A Multi-Purpose Internet Mail Extension (eg. “application/octet-stream”), also known as a MIME, is type of Internet standard originally developed to allow the exchange of different types of data files through e-mail messages. MIME types like application/octet-stream are classified into specific data categories such as Video, Audio, Image, and many more. This categorization provides instructions to your computer or mobile device about how these files should be opened / viewed.
Why Do I Need MIME Types Like application/octet-stream?
Categorizing MIME types like application/octet-stream into a data type such as “Application” allows your e-mail client or Internet browser to display the content as intended. For example, when you attach a digital camera photo file to an e-mail, an Image MIME type will be associated with that file to allow your recipient to view the photograph.
Here's how it works: Web servers (computers that host websites and e-mail) insert a set of MIME instructions into the beginning of a data transmission, such as an e-mail message or webpage, in the following format:
Content-Type: application/octet-stream
[Format Explanation: The MIME type, which in this example is “Application”, is separated by a forward slash (“/”) and followed by a subtype.]
This set of instructions tells your client application, such as an e-mail program (eg. Microsoft Outlook, Apple Mail) or web browser (eg. Google Chrome, Mozilla Firefox), which “player application” should be used to properly display the application/octet-stream content.
Many modern web browsers include built-in components to display common data types such as image players (eg. GIF, JPEG), Adobe Flash Player, Javascript, and many more. Other less-common types of players must be downloaded separately in order to properly display the MIME content.
What Are The Most Common Problems Associated With application/octet-stream?
Sometimes you’ll find that your web browser or e-mail client is unable to properly display your application/octet-stream content. This could be due to one of two reasons:
1. You are missing the proper Application “player software” to display the application/octet-stream content.
2. Your Windows Registry contains an incorrect file extension (eg. XLS, PDF) association with the application/octet-stream MIME type.
How To Fix application/octet-stream Issues
Do I have the application/octet-stream “player application” installed?
The first step in troubleshooting issues with opening application/octet-stream content is to first make sure that you have the correct “player application” installed for this MIME type. Because there can be several (or even hundreds) of related software applications to application/octet-stream, it is very difficult for us to compile a comprehensive list.
Therefore, a key strategy in determining the correct application is to look for clues on what software programs might be related to application/octet-stream. Look at the naming of the subtype for clues about a related program (eg. Word, Excel) or software developer name (eg. Microsoft).
Furthermore, if you’ve been sent MIME type application/octet-stream as an e-mail attachment, look for the file extension of the attached file. This file extension (eg. PKG, LHA, LZH, etc.) can provide you with a clue of what “player application” is associated with this Application MIME. Take a look at our file extension list below to see if there are any clues to finding the right “player application”.
Do I have broken application/octet-stream file associations?
The second step in troubleshooting application/octet-stream issues is making sure that you have correct file associations in the Windows Registry. Installing and uninstalling programs can lead to incorrect file associations with application/octet-stream. Take a look at your Windows Registry settings to ensure that the MIME type is correctly associated with the “player application” and file extension.
WARNING: DO NOT edit the Windows Registry unless you are an advanced computer user with experience editing the Registry. Making an error in editing the Registry can create irreversible damage to your PC.
If you are not comfortable editing the Windows Registry, we highly recommend using an automated registry cleaning program, or taking you computer to a qualified professional.
-->Various content types can flow through a logic app,for example, JSON, XML, flat files, and binary data.While Logic Apps supports all content types, some have nativesupport and don't require casting or conversion in your logic apps.Other types might require casting or conversion as necessary.This article describes how Logic Apps handles content types andhow you can correctly cast or convert these types when necessary.
To determine the appropriate way for handling content types,Logic Apps relies on the Content-Type
header value in HTTP calls,for example:
- application/json (native type)
- text/plain (native type)
application/json
Logic Apps stores and handles any request with the application/jsoncontent type as a JavaScript Notation (JSON) object.By default, you can parse JSON content without any casting.To parse a request that has a header with the 'application/json' content type,you can use an expression. This example returns the value dog
from theanimal-type
array without casting:
@body('myAction')['animal-type'][0]
If you're working with JSON data that doesn't specify a header,you can manually cast that data to JSON by using thejson() function,for example:
@json(triggerBody())['animal-type']
Create tokens for JSON properties
Logic Apps provides the capability for you to generate user-friendlytokens that represent the properties in JSON content so you canreference and use those properties more easily in your logic app's workflow.
Request trigger
When you use this trigger in the Logic App Designer, you can providea JSON schema that describes the payload you expect to receive.The designer parses JSON content by using this schema and generatesuser-friendly tokens that represent the properties in your JSON content.You can then easily reference and use those properties throughout yourlogic app's workflow.
If you don't have a schema, you can generate the schema.
In the Request trigger, select Use sample payload to generate schema.
Under Enter or paste a sample JSON payload, provide a sample payloadand then choose Done. For example:
The generated schema now appears in your trigger.
Here is the underlying definition for your Request trigger in the code view editor:
In your request, make sure you include a
Content-Type
headerand set the header's value toapplication/json
.
Parse JSON action
When you use this action in the Logic App Designer,you can parse JSON output and generate user-friendlytokens that represent the properties in your JSON content.You can then easily reference and use those propertiesthroughout your logic app's workflow. Similar tothe Request trigger, you can provide or generate aJSON schema that describes the JSON content you want to parse.That way, you can more easily consume data from Azure Service Bus,Azure Cosmos DB, and so on.
text/plain
When your logic app receives HTTP messages thathave the Content-Type
header set to text/plain
,your logic app stores those messages in raw form.If you include these messages in subsequent actions without casting,requests go out with the Content-Type
header set to text/plain
.
For example, when you're working with a flat file,you might get an HTTP request with the Content-Type
header set to text/plain
content type:
Date,Name,Address
Oct-1,Frank,123 Ave
If you then send this request on in a later action as the body for another request,for example, @body('flatfile')
, that second request also has a Content-Type
header that's set to text/plain
. If you're working with data that is plain textbut didn't specify a header, you can manually cast that data to text by using thestring() functionsuch as this expression:
@string(triggerBody())
application/xml and application/octet-stream
Logic Apps always preserves the Content-Type
in a received HTTP request or response.So if your logic app receives content with Content-Type
set to application/octet-stream
,and you include that content in a later action without casting,the outgoing request also has Content-Type
set to application/octet-stream
.That way, Logic Apps can guarantee that data doesn't get lost while moving through the workflow.However, the action state, or inputs and outputs, is stored in a JSON objectwhile the state moves through the workflow.
Converter functions
To preserve some data types, Logic Apps converts content to a binarybase64-encoded string with appropriate metadata that preserves boththe $content
payload and the $content-type
, which are automatically converted.
Application/octet-stream Encoding Type
This list describes how Logic Apps converts content when you use thesefunctions:
json()
: Casts data toapplication/json
xml()
: Casts data toapplication/xml
binary()
: Casts data toapplication/octet-stream
string()
: Casts data totext/plain
base64()
: Converts content to a base64 stringbase64toString()
: Converts a base64 encoded string totext/plain
base64toBinary()
: Converts a base64 encoded string toapplication/octet-stream
encodeDataUri()
: Encodes a string as a dataUri byte arraydecodeDataUri()
: Decodes adataUri
into a byte array
For example, if you receive an HTTP requestwhere Content-Type
set to application/xml
,such as this content:
You can cast this content by using the @xml(triggerBody())
expression with the xml()
and triggerBody()
functionsand then use this content later. Or, you can use the@xpath(xml(triggerBody()), '/CustomerName')
expressionwith the xpath()
and xml()
functions.
Other content types
Logic Apps works with and supports other content types,but might require that you manually get the messagebody by decoding the $content
variable.
For example, suppose your logic app gets triggered by a requestwith the application/x-www-url-formencoded
content type.To preserve all the data, the $content
variable in therequest body has a payload that's encoded as a base64 string:
CustomerName=Frank&Address=123+Avenue
Because the request isn't plain text or JSON,the request is stored in the action as follows:
Logic Apps provides native functions for handling form data, for example:
Or, you can manually access the data by using an expression such as this example:
@string(body('formdataAction'))
Octet Stream Encoding Download
If you wanted the outgoing request to have the sameapplication/x-www-url-formencoded
content type header,you can add the request to the action's body withoutany casting by using an expression such as @body('formdataAction')
.However, this method only works when the body is the onlyparameter in the body
input. If you try to use the@body('formdataAction')
expression in an application/json
request,you get a runtime error because the body is sent encoded.