Questions tagged as 'content-type'

0
answers

Unknown content-type problem

What is the behavior of a web client (browser) when it receives an HTTP message with an unknown Content-type?     
asked by 21.01.2018 / 00:27
0
answers

How do I download a PDF for my application where the request made to the API returns Content-Disposition attachment?

My application makes a connection to an API that returns a PDF. This PDF is returned as an attachment according to the following image and when I try to save this file to any folder through my application, or an error occurs or the file is saved...
asked by 14.11.2018 / 13:24
0
answers

PHP - file_get_contents ('php: // input') is the only way to read request contentType = application / json?

I have the following Jquery Ajax method function postRefreshJson(_action, jsonModel) { $.ajax({ url: _action, method: 'POST', beforeSend: function (xhr) {...
asked by 27.10.2018 / 15:11
1
answer

Error 415 when posting to json for api

import json import requests #criando categoria r0_categoria_dc = {"chave": "r0_formulario", "titulo": "r0_dados_academico", "descricao": "r0_armazena_dados"} r0_categoria_js = json.dumps(r0_categoria_dc) print(r0_categoria_js) r0_obj = requests.p...
asked by 01.09.2018 / 21:35
0
answers

What is the correct content-type to download automatically?

I have a download functionality on a button, clicking does not download the file, the contents of the worksheet are displayed inside the page. This only occurs on IOS devices. I've tried using other content-type for .xls or the force-download bu...
asked by 10.07.2018 / 23:50
0
answers

I can not generate content-type php output for jpg image

Good morning everyone. I'm trying to make the output of a jpg image content type print only the image, but I can not. header ("Content-type: image / jpeg"); I put everything in correctly, but going forward when I try to get the data, no...
asked by 26.01.2018 / 15:41
1
answer

Configure headers on Axios?

I'm using Axios to make the requests between client and server, but I'm having problems with headers . When I do the requests Postman returns exactly what I want (which in this case is a PDF), but when I make the request through my client...
asked by 04.08.2017 / 21:26
1
answer

Images with content-type like text / html, how to solve? [closed]

I am doing a foreach in the controller to test if it is returning all images the problem is that the images do not appear because the content-type is like text / html, when I am using the index method of the controller no problem, all files incl...
asked by 02.12.2017 / 22:52