Questions tagged [request]

A request is a message sent by a source to another object.

A request is a message sent by a source (e.g. computer, client, browser ...etc) to another object or device (e.g. server, computer, phone, app ...etc).

src : wikipedia link

15235 questions
138
votes
2 answers

Getting binary content in Node.js using request

I was trying to GET a binary data using request, and had something like: var requestSettings = { method: 'GET', url: url, }; request(requestSettings, function(error, response, body) { // Use body as a binary Buffer } But body was always…
GilZ
  • 6,040
  • 5
  • 26
  • 38
116
votes
4 answers

PHP GuzzleHttp. How to make a post request with params?

How to make a post request with GuzzleHttp( version 5.0 ). I am trying to do the following: $client = new \GuzzleHttp\Client(); $client->post( 'http://www.example.com/user/create', array( 'email' => 'test@gmail.com', 'name'…
Arsen
  • 3,081
  • 4
  • 11
  • 7
115
votes
5 answers

Node.js: How to send headers with form data using request module?

I have code like the following: var req = require('request'); req.post('someUrl', { form: { username: 'user', password: '', opaque: 'someValue', logintype: '1'}, }, function (e, r, body) { console.log(body); }); How can I set headers…
Mike G.
  • 3,512
  • 3
  • 14
  • 16
111
votes
14 answers

Get current URL of UIWebView

I already tried getting the current URL of my UIWebView with: webview.request.URL. Unfortunately the NSURL was empty. Anything wrong here? I am working with Xcode 3.2.2 beta 5. The code above should be executed in the UIWebView delegate…
danielreiser
  • 5,112
  • 5
  • 28
  • 43
106
votes
5 answers

PHP CURL DELETE request

I'm trying to do a DELETE http request using PHP and cURL. I have read how to do it many places, but nothing seems to work for me. This is how I do it: public function curl_req($path,$json,$req) { $ch = curl_init($this->__url.$path); $data =…
Bolli
  • 4,714
  • 5
  • 29
  • 45
100
votes
3 answers

Webpack - Critical dependency: the request of a dependency is an expression

I am getting three warning messages when importing request in a barebone webpack project. A minimal example to reproduce the bug is available on GitHub (run npm install and npm start). Critical dependency: the request of a dependency is an…
Jodiug
  • 3,233
  • 4
  • 22
  • 38
100
votes
8 answers

Get raw URL from Microsoft.AspNetCore.Http.HttpRequest

The HttpRequest class in Asp.Net 5 (vNext) contains (amongst other things) parsed details about the URL for the request, such as Scheme, Host, Path etc. I've haven't spotted anywhere yet that exposes the original request URL though - only these…
Jon Egerton
  • 36,729
  • 11
  • 90
  • 125
92
votes
3 answers

Python send POST with header

I try to build a python script who sends a POST with parameters for extracting the result. With fiddler, I have extracted the post request who return that I want. The website uses https only. POST /Services/GetFromDataBaseVersionned HTTP/1.1 Host:…
Matt
  • 3,549
  • 5
  • 32
  • 47
91
votes
7 answers

if-modified-since vs if-none-match

What could be the difference between if-modified-since and if-none-match? I have a feeling that if-none-match is used for files whereas if-modified-since is used for pages?
Tower
  • 87,855
  • 117
  • 329
  • 496
89
votes
5 answers

Show Curl POST Request Headers? Is there a way to do this?

I'm building a Curl web automation app and am having some issue with not getting the desired outcome of my POST action, I am having some trouble figuring out how I can show the full POST request I am sending over (with headers), I have been…
Rick
  • 15,305
  • 33
  • 106
  • 160
88
votes
9 answers

AWS Lambda Error: "Cannot find module '/var/task/index'"

Node.js Alexa Task Issue I'm currently coding a Node.js Alexa Task via AWS Lambda, and I have been trying to code a function that receives information from the OpenWeather API and parses it into a variable called weather. The relevant code is as…
88
votes
12 answers

POST request with a simple string in body with Alamofire

how is it possible to send a POST request with a simple string in the HTTP body with Alamofire in my iOS app? As default Alamofire needs parameters for a request: Alamofire.request(.POST, "http://mywebsite.com/post-request", parameters: ["foo":…
Karl
  • 1,451
  • 3
  • 12
  • 13
88
votes
1 answer

Save a large file using the Python requests library

Possible Duplicate: How to download image using requests I know that fetching a url is as simple as requests.get and I can get at the raw response body and save it to a file, but for large files, is there a way to stream directly to a file? Like…
Matt Williamson
  • 34,999
  • 10
  • 60
  • 70
87
votes
4 answers

Simultaneous Requests to PHP Script

If the PHP Engine is already in the middle of executing a script on the server what would happen to other simultaneous browser requests to the same script? Will the requests be queued? Will they be ignored? Will each request have its own…
Kevin Boyd
  • 11,251
  • 24
  • 80
  • 125
87
votes
2 answers

Spring MVC How take the parameter value of a GET HTTP Request in my controller method?

In this period I am studing the Spring MVC showcase example (downloadable from STS dasboard) and I have some simple question about the Request Mapping examples: 1) In my home.jsp page I have this link:
  • AndreaNobili
    • 34,200
    • 85
    • 240
    • 456