mjrgit / chrome-rest-client

Automatically exported from code.google.com/p/chrome-rest-client
0 stars 0 forks source link

Remove Content-Type header form GET requests #150

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Just perform a GET request to any URL (endpoint)

What is the expected output? 
- Well formed GET request

What do you see instead?
- GET Request includes Content-Type header:
  Content-Type:text/plain; charset=utf-8

On what operating system, browser and browser version?
- Any OS, browser Chrome Version 24.0.1312.52
  But this is really a problem with the REST Client as Chrome doesn't set Content-Type header in normal GET requests.

Please provide any additional information below.

- This seems innocuous in most cases, but it affects some proxies. Content-Type 
header is required only in requests that have an Entity.

  As a plus, would be nice that the default set of headers (not user defined, like User-Agent, Accept-*, Cookie), can be seen before performing the request, this give you a chance to modify them or remove them.

Thank you very much,

A Ramos

Original issue reported on code.google.com by s...@rayamos.com on 28 Jan 2013 at 10:41

GoogleCodeExporter commented 8 years ago
Thank you for this issue report.

Content-type header shouldn't appear in request when there is no payload. It is 
an error with application logic. I will look into this.

As for a browsers headers - once the Chromes API that make it possible will be 
available in stable version it will be available for this application (it is 
already implemented).

Original comment by jarro...@gmail.com on 9 Feb 2013 at 1:31

GoogleCodeExporter commented 8 years ago
Hi again,
I noticed that Content-type header for GET requests is set by the Browser by 
default. I can't remove it within the application. At least in stable version. 
As soon declarativeWebRequeswt API will be available to stable release of 
Chrome it will be fixed. 

Original comment by jarro...@gmail.com on 25 Feb 2013 at 7:44

GoogleCodeExporter commented 8 years ago
Hi there,

This is a great tool for Rest requests, but I have had the same issue in some 
situations - adding "Content-Type: text/plain; charset=utf-8" meant my request 
failed - running the same "Get" request worked fine in Fiddler

good luck!

Toby

Original comment by tobysev...@gmail.com on 13 Jun 2013 at 11:54