Questions tagged [http-request]

HTTP Request is a message within a request/response sequence, according to HTTP specification. May also refer an HttpRequest class in software frameworks and libraries that automates relevant functionality

From W3C specification:

A request message from a client to a server includes, within the first line of that message, the method to be applied to the resource, the identifier of the resource, and the protocol version in use.

    Request       = Request-Line              ;
                    *(( general-header        ;
                     | request-header         ;
                     | entity-header ) CRLF)  ;
                    CRLF
                    [ message-body ]          ;

See also:

355 questions
6
votes
2 answers

Measuring time on node.js http requests

I was wondering if we can measure the time it takes for an http request to be completed using node.js. Modifying slightly an example from the documentation (here), one can easily write down the following code. var http = require('http'); var…
MightyMouse
  • 13,208
  • 8
  • 33
  • 43
6
votes
3 answers

Making stringWithContentsOfURL asynchronous - Is it safe?

I attempted to make -[NSString stringWithContentsOfURL:encoding:error:] asynchronous, by running it a-synchronically from a background thread: __block NSString *result; dispatch_queue_t currentQueue = dispatch_get_current_queue(); void…
JonasG
  • 9,274
  • 12
  • 59
  • 88
5
votes
3 answers

Android HTTP Request AsyncTask

I want to implement a class which will handle all HTTP Requests of my application, which will be basically: Get a list of business (GET); Execute a login (POST); Update the location (POST). So, I will have to get the result string from the server…
Danniel Magno
  • 304
  • 1
  • 3
  • 21
5
votes
3 answers

Translate PHP PUT HTTP request to ColdFusion

What would this code look like in ColdFusion? protected function httpPut($url, $params = null, $data = null) { $fh = fopen('php://memory', 'rw'); fwrite($fh, $data); rewind($fh); $ch = curl_init($url); …
Jason
  • 17,276
  • 23
  • 73
  • 114
5
votes
1 answer

POST/GET bindings in Racket

Is there a built-in way to get at POST/GET parameters in Racket? extract-binding and friends do what I want, but there's a dire note attached about potential security risks related to file uploads which concludes Therefore, we recommend against…
Inaimathi
  • 13,853
  • 9
  • 49
  • 93
5
votes
1 answer

server taking too much time to start a port

I am using Ubuntu 14.04 and I am trying to install Laravel framework. In this purpose I have run this code in terminal: php artisan serve After waiting for 4-5 minutes I got this response: Laravel development server started on…
partho
  • 1,101
  • 2
  • 21
  • 37
5
votes
4 answers

How do I send asynchronous http requests in python one at a time?

We have a queue of jobs and workers process these jobs one at a time. Each job requires us to format some data and issue an HTTP POST request, with the data as the request payload. How can we have each worker issue these HTTP POST requests…
David Kravitz
  • 96
  • 1
  • 4
5
votes
2 answers

Java how to handle HTTP GET request after establishing TCP connection

So after establishing my listening for a connection and accepting one: ServerSocket serverSock = new ServerSocket(6789); Socket sock = serverSock.accept(); When I type into my browser localhost:6789/index.html how do I handle this incoming GET…
meiryo
  • 11,157
  • 14
  • 47
  • 52
4
votes
3 answers

Python requests library combine HTTPProxyAuth with HTTPBasicAuth

Found an example on HTTPProxyAuth usage here https://stackoverflow.com/a/8862633 But I'm hoping for a sample on usage with both HTTPProxyAuth and HTTPBasicAuth IE I need to pass a server, username and password through the proxy and a username and…
thylacine
  • 61
  • 1
  • 5
4
votes
1 answer

Python Requests Module & JSON Responses

I am using the awesome Requests module to test an API I've created for one of our internal projects. I believe I have discovered what is either a flaw in the Requests module itself, or a flaw in my usage of it. Because our data is not super…
tommytwoeyes
  • 483
  • 5
  • 19
4
votes
2 answers

How to use jQuery .get() in Windows Gadget

I'm trying to get data from a web-page into my sidebar gadget via: $.get("http://localhost/index.php", function(data) { $("#result").html("Data Loaded: " + data); }); When I view this via my Apache webserver, it works.Using this code within the…
lugro
  • 43
  • 3
4
votes
2 answers

How I can make a http request with Firebase to external APIs?

I would like to migrate an app Node.js to Firebase. In NodeJS Server was using this: var express = require('express'); var app = express(); app.get('/rq/bots', function (req, res) { var query='http://externalAPIQuery?q=something' var request =…
4
votes
1 answer

Persistent connection with libcurl

The following is from the libcurl homepage: curl and libcurl have excellent support for persistent connections when transferring several files from the same server. Curl will attempt to reuse connections for all URLs specified on the same command…
jensa
  • 2,792
  • 2
  • 21
  • 36
4
votes
1 answer

Oracle mod_plsql does not implement PUT and DELETE HTTP requests

I am running Oracle-Application-Server-10g and using mod_plsql for webserver. While webserver accepts HTTP requests such as POST, DELETE and HEAD, I can not find a way in setting it to accept other HTTP requests such as PUT and DELETE. Sending PUT…
tomtom
  • 41
  • 1
4
votes
3 answers

Get all HTTP requests with WebDriver/HtmlUnit

I need to verify a request for testing via WebDriver. Unfortunately there is no easy way to do this as there is no native support. It seems like I should be able to use HtmlUnit to get requests but I have only been able to get responses. Is there a…
johnsoe
  • 664
  • 1
  • 5
  • 13