Questions tagged [custom-headers]
117 questions
48
votes
4 answers
Add my custom http header to Spring RestTemplate request / extend RestTemplate
My current code:
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
Mall[] malls = restTemplate.getForObject(url, Mall[].class);
I need to add some custom headers for…

user1209216
- 7,404
- 12
- 60
- 123
14
votes
4 answers
Selenium PhantomJS custom headers in Python
I want to add "custom headers" to Selenium PhantomJS in python.
These are the headers I wanna add.
headers = { 'Accept':'*/*',
'Accept-Encoding':'gzip, deflate, sdch',
'Accept-Language':'en-US,en;q=0.8',
…

Sumit Jha
- 2,095
- 2
- 21
- 36
11
votes
3 answers
chromium - send custom header info on initial page load c#
Or How to inject a custom header into the initial request to a site when new-ing up an instance of the ChromiumWebBrowser.
I'm a noob with Chromium and could really use some help. I have a winforms app with a CEF window. K, no prob so far. What I…

JackJack
- 111
- 1
- 1
- 6
9
votes
2 answers
Adding custom HTTP headers to nginx X-Accel-Redirect
I am serving restricted downloads in rails using X-Accel-Redirect with nginx. To validate my downloads in client app, i am trying to send the checksum in the non standard HTTP header Content-MD5 to the X-Accel-Redirect request. But this is not…

RameshVel
- 64,778
- 30
- 169
- 213
8
votes
3 answers
Resttemplate GET Request with Custom Headers
I need to send a GET request with a header: Content-Type: application/camiant-msr-v2.0+xml. I expect an XML response from the server. I tested the request and response with Postman and everything is good. But when I try to do it in Spring with…

J Freebird
- 3,664
- 7
- 46
- 81
8
votes
1 answer
Django custom response headers
I need to set custom response headers in Django project.
Here is code from facts/urls.py:
d = {
'app_name': 'facts',
'model_name': 'Fact'
}
urlpatterns = patterns('',
(r'^$', 'facts.main', d),
)
This approach shows data from model, but…

Phantom
- 1,704
- 4
- 17
- 32
7
votes
2 answers
Custom headers in EventSource connection
When I create a new EventSource in JavaScript to listen for server-sent events, like this:
var source = new EventSource("data/pushed");
Is there any way for me to specify additional headers (like some authentication token) in the outgoing HTTP…

Jean-Philippe Pellet
- 59,296
- 21
- 173
- 234
6
votes
3 answers
AWS cloudfront add custom header without using Lambda@Edge
I would like to add x-frame-options as sameorigin to AWS CloudFront service that serving my application on S3 bucket.
I don't want add new Lambda function to edit requests header.
Actually I found a place under like Attached file:
CloudFront…

Ali SadeghipourKorabaslo
- 534
- 1
- 8
- 25
5
votes
3 answers
Is it Possible to Make Cross-Domain Requests in Javascript AND Set Custom Headers?
Since you can't apply custom headers on JSONP calls, how do I make cross domain requests AND apply custom headers using jQuery?
I'm basically trying to access google docs with jQuery and need to pass an authentication token:
var token =…

Lance
- 75,200
- 93
- 289
- 503
4
votes
2 answers