content-type Questions

4

Solved

I'm uploading some jars into s3 and want to set the right content-type headers for them. I looked through what I thought was a comprehensive list, and was unable to find any mention of jar.
Panta asked 10/6, 2017 at 2:20

4

Solved

How to remove header content-type in apache ? The following code does not work header_remove('content-type');
Yvoneyvonne asked 20/8, 2013 at 4:6

8

I have an ASP.NET Web API endpoint with controller action defined as follows : [HttpPost] public HttpResponseMessage Post([FromBody] object text) If my post request body contains plain text ( i.e....
Mudra asked 2/9, 2014 at 20:38

2

Solved

I'm trying to build a simple single page application via express. Everything works fine until I start creating the classes, then the browser throws the following error: Failed to load module scrip...
Carver asked 22/10, 2021 at 13:27

24

Solved

I'm trying to set the Content-Type header of an HttpClient object as required by an API I am calling. I tried setting the Content-Type like below: using (var httpClient = new HttpClient()) { htt...
Rodgerrodgers asked 21/5, 2012 at 3:29

4

Solved

I need to get the MIME type of an image, but I only have the body of the image which I've got with file_get_contents. Is there a possibility to get the MIME type?
Perusse asked 11/8, 2014 at 6:35

11

Solved

We have a website hosted on Azure. It is media based, and we are using JWPlayer to playback media with HTTP pseudostreaming. The media files are stored on blob in 3 formats - mp4, ogg, webm. The i...
Blois asked 6/4, 2012 at 7:19

5

Solved

If I have a content-type, how can I get its default file extension? For example, given one of these content-types, I should get the following file extensions: +------------------------+----------...
Calley asked 10/1, 2012 at 9:58

3

I'm trying to test a Rest api which is working on postman but not on Jmeter, the request takes (2 parameters): a pdf file a body data (json containing pdf information) on Postman : when I pu...
Ginter asked 31/5, 2019 at 10:12

4

Solved

I am getting base64 for string from backend and i am then decoding it in Javascript to show on browser. This string can be any file .pdf, .img, .docx, .zip etc. My base64 string does not includ...
Ruttger asked 17/9, 2019 at 14:50

4

Solved

I have got a problem with getting excel file and opening download window in the browser after getting a response (in success ajax method) with that file. I have got appropriate Content-Type and Con...
Basilio asked 6/11, 2017 at 10:25

9

Solved

I recently attempted to load some fixtures into my database. When I run the server and load various pages though I get the error: Caught DoesNotExist while rendering: ContentType matching query do...
Proffer asked 14/7, 2011 at 17:56

5

My application makes numerous HTTP requests. Without writing a regular expression, how do I parse Content-Type header values? For example: text/html; charset=UTF-8 For context, here is my code for...
Fluviatile asked 1/9, 2015 at 11:12

2

I am doing an Ajax login for my Laravel application. I am using Angular: $http({ method: 'POST', url: '/admin/login', headers: { 'Content-Type': 'application/json' }, data: {email:$scope.emai...
Tirewoman asked 10/7, 2017 at 15:7

39

Solved

There are many "standards" for the JSON content type: application/json application/x-javascript text/javascript text/x-javascript text/x-json Which one do I use, and where? I assume secu...
Unhallowed asked 25/1, 2009 at 15:25

2

Solved

string fileName = "test.zip"; string path = "c:\\temp\\"; string fullPath = path + fileName; FileInfo file = new FileInfo(fullPath); Response.Clear(); Response.ClearContent(); Response.ClearHeader...
Antioch asked 16/3, 2010 at 17:58

2

Solved

I'm working with an HTML document I did not author. It contains the following: <link rel="stylesheet" href="/static/oxygen-fontfacekit/stylesheet.css" charset="utf-8" /> Does specifying th...
Opening asked 19/6, 2013 at 18:51

3

After a migration from Spring Boot 2.1.10 to 2.2.4 the below method started to return null for the params parameter. It's not a bug in Spring as it works when I make a small sample project. It also...
Jenness asked 3/2, 2020 at 14:54

4

JSON has application/json as a standard. For protobuf some people use application/x-protobuf, but I saw something as odd as application/vnd.google.protobuf being proposed. Do we have an RFC or some...
Broadbent asked 28/5, 2015 at 11:33

5

Solved

The closest thing I could find was System.Net.Mime.MediaTypeNames but that doesn't seem to have everything (like json) since it seems to be more focused around email attachments.
Upcountry asked 19/6, 2009 at 0:35

4

Solved

I've written a PHP script that handles file downloads, determining which file is being requested and setting the proper HTTP headers to trigger the browser to actually download the file (rather tha...
Swiercz asked 22/12, 2008 at 17:40

1

I have the following FastAPI application: from pydantic import BaseModel as Schema from fastapi import FastAPI api = FastAPI() class User(Schema): firstname: str lastname: str age: int | None ...
Ligurian asked 5/2, 2023 at 16:7

5

Solved

The Azure Logic Apps action "Get Blob Content" doesn't allow us to set the return content-type. By default, it returns the blob as binary (octet-stream), which is useless in most cases. In general...
Denominational asked 24/4, 2017 at 21:41

6

Solved

What is the difference between these headers? Content-Type: application/javascript Content-Type: application/x-javascript Content-Type: text/javascript Which one is best and why? Please do not ...
Manner asked 12/3, 2012 at 9:12

11

Solved

I have a byte array filled from a file uploaded. But, in another part of the code, I need to know this file type uploaded from the byte[] so I can render the correct content-type to browser! Thank...
Cincinnati asked 31/10, 2009 at 16:25

© 2022 - 2025 — McMap. All rights reserved.