Linked Questions
41 questions linked to/from How to send a header using a HTTP request through a cURL call?
427 votes
2 answers
1.4m views
HTTP POST and GET using cURL in Linux [duplicate]
I have a server application written in ASP.NET on Windows that provides a web service. How can I call the web service in Linux with cURL?
0 votes
0 answers
212 views
Django: how to disable the HTTP_HOST check on a specific endpoint? [duplicate]
I defined a super simple healthcheck endpoint in my Django app (urls.py) to be used in a docker compose environment, like: services: django: build: context: . dockerfile: ./compose/...
789 votes
10 answers
800k views
Converting a Postman request to curl
I am calling my Java webservice (POST request) via Postman in the following manner which works perfectly fine (i.e. I can see my records getting inserted into the database): And, here's how the ...
130 votes
6 answers
164k views
How to call cURL without using server-side cache?
Is there a way to tell cURL command not to use server's side cache? e.g; I have this curl command: curl -v www.example.com How can I ask curl to send a fresh request to not use the cache? Note: I am ...
92 votes
3 answers
203k views
Can I call curl_setopt with CURLOPT_HTTPHEADER multiple times to set multiple headers?
Can I call curl_setopt with CURLOPT_HTTPHEADER multiple times to set multiple headers? $url = 'http://www.example.com/'; $curlHandle = curl_init($url); curl_setopt($curlHandle, CURLOPT_HTTPHEADER, ...
42 votes
5 answers
41k views
Django Rest Framework custom authentication
Django rest framework: Custom Authentication I want to use custom authentication in my Django app but cannot find how to apply this. The example given in the documentation is clear to me but they did ...
62 votes
3 answers
119k views
How to spoof http referer
As of current, are there still any methods to spoof HTTP referer?
31 votes
2 answers
21k views
Accessing custom header variables in Ruby on Rails
After reading the following question (Authorization header in Ruby on Rails accessed with key HTTP_AUTHORIZATION instead of Authorization?) I have a similar problem as the OP, but the proposed answer ...
12 votes
4 answers
34k views
Oauth2 for SharePoint 365 REST
I'm trying to connect to Sharepoint Online (Sharepoint 365?) content using OAuth2 and the REST API. I need to do this from Python as it is an addition to an existing application. I have already ...
10 votes
1 answer
16k views
Aws Cognito : how to get the token for API command line testing?
I am attempting to authenticate a REST API in AWS API Gateway, which is protected by AWS Cognito through the command line to do some security testing of the API. So, i'm supposed to send the ...
1 vote
2 answers
4k views
SharePoint Error using Office 365 REST API OAuth access_token
I am developing a rather simple application that retrieves files from SharePoint using the REST Office 365 API. This is a batch job running in the background with no user interface so the following ...
2 votes
1 answer
3k views
file_get_contents failed to open stream: HTTP request failed! HTTP/1.1 463
I am trying to get RSS from other sites. They all work fine using file_get_contents except one link give me this error: Warning: file_get_contents(http://alwatan.kuwait.tt/rss.ashx): failed to open ...
1 vote
3 answers
6k views
How to send `apikey` in header in Alamofire 4.5,Swift 4?
I want to make a HTTP post request via Alamofire 4.5. The request need an authorization header(which is a Api key). But whenever I fired the request,my server cant detect the ApiKey.' Here is how I ...
3 votes
1 answer
6k views
Java REST Enabling CORS (Access-Control-Allow-Origin) Glassfish
Hi I'm working on a REST api in java using Glassfish 4.1.1 as server and java EE 7 and as front end I'm using AngularJS also on netbeans. I was following this simple tutorial https://www.youtube.com/...