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
2
votes
2 answers

In Rails, how do I access the Request.ServerVariables like you do in ASP?

I want to access a given Requests ServerVariables, but I can't seem to find anything on Google on how to get access to the Server Vars of the request object. How do I do this or am I doomed to simply never know? An example of why I'd want to do…
Ash
  • 24,276
  • 34
  • 107
  • 152
2
votes
1 answer

Using Python-Requests Library to Post a Text File

Hi I'm having trouble posting a text file using the Python Requests Library ( http://docs.python-requests.org/en/latest/index.html ), can you let me know what I'm doing wrong? I tried searching for related questions and found this Send file using…
user1043502
2
votes
2 answers

Too many redirects error using Python requests

HTTP requests are working fine on my localhost, but running the same HTTP requests using the python requests library on my server returns a "Too Many Redirects" error When I enter localhost/terminal/jfk in a browser, I get a json dictionary as…
Asha
  • 259
  • 4
  • 8
2
votes
1 answer

Rails or Sinatra - How can I handle an invalid HTTP request?

I have a 3G+GPS device (Digi WR44) that can send NMEA packets to any IP address. I would like to get this data from a Rails (or Sinatra) application, but the packets are not send as a valid HTTP request and both Rails and Sinatra fails. Here is the…
Matthieu
  • 131
  • 1
  • 5
2
votes
3 answers

LWP::UserAgent - HTTP::Request

If I do this #!/usr/local/bin/perl use warnings; use 5.014; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $res = $ua->get( 'http://www.perl.org' ); I can call HTTP::Response methods like this say $res->code; Is it somehow possible to…
sid_com
  • 24,137
  • 26
  • 96
  • 187
2
votes
1 answer

GET request using GWT to retrieve XML data?

Oh hello there, fellow SO members, I have a web service that returns XML data using a simple get request that goes like this : http://my-service:8082/qc/getData?paramX=0169¶mY=2 the service returns raw xml in the page according to the…
dominicbri7
  • 2,479
  • 4
  • 23
  • 33
2
votes
1 answer

Perl equivalent of a sample JavaScript codes

I have this code: request({ uri: 'https://graph.facebook.com/v2.6/me/messages', qs: { access_token: PAGE_ACCESS_TOKEN }, method: 'POST', json: messageData }) I'd like to convert that into Perl, what I have so far is: my $req =…
Sophia
  • 192
  • 12
2
votes
1 answer

ECONNREFUSED, Node HTTP GET Request

I'm in a bit over my head trying to do a few things that are new to me. I'm building an API to interact with a Nationbuilder website using Node and AWS Lambda. I need to draw information from the database using Nationbuilder's API. I've tried a…
Peter Breen
  • 447
  • 1
  • 10
  • 24
2
votes
1 answer

How to make request to server running on docker

On my machine I'm running an application in Docker (it runs on http://localhost:8181). I've started Docker with docker run -p 8181:8181 myapp. After some searching I've tried to send my request to the output of docker0 when I run ifconfig, which…
user16655
  • 1,901
  • 6
  • 36
  • 60
2
votes
1 answer

Nativescript - How to POST Image with http.request

Help, I need call the http.request for send Image captured in camera api in my NativeScript App. I capture the photo in camera api for nativescript and need send to api in upload process. Follow the code about this process: var frameModule =…
2
votes
1 answer

Separate CSS file for each angular2 component affects performance of page?

All the guides about Angular2 propose to have a separate file for css styling for each component. As I get is so far, for each custom directive there is the need to make requests to the server to get the html and css for that directive (component).…
koninos
  • 4,969
  • 5
  • 28
  • 47
2
votes
1 answer

Passing Empty array parameter to MockHttpServletRequestBuilder param method

I am using MockHttpServletRequestBuilder to create my request for testing my framework. One of the request parameters I have is a string array. For my testing I want to test with passing an empty array in my request. However, the assertion in…
rozagh
  • 73
  • 1
  • 12
2
votes
2 answers

AWS Android SDK Invoking Signed HTTP Request

I have AWSCredentials object includes accesskey, sessiontoken, etc. However, although it seems very simple, i couldn't find any document how i can call simple http request(For example to Api Gateway service) using these credentials. I tried…
Arda Güçlü
  • 728
  • 2
  • 6
  • 27
2
votes
1 answer

When the actual download occurs for a Http Request

I am downloading a zip file from Amazon S3. Then I convert this zip to MemoryStream. My code is below AmazonS3Client s3Client = new AmazonS3Client(basicAwsCredentials, Amazon.RegionEndpoint.GetBySystemName(item.RegionEndPoint)); //This operation…
Emdadul Sawon
  • 5,730
  • 3
  • 45
  • 48
2
votes
1 answer

Receiving http response inside a Docker container

I am running a process, process A, inside a Docker container that sends an HTTP reqeust to a process, process B, running natively on the host. Process B receives the request and after processing sends a response which process A does not receive. I…
Phelodas
  • 3,853
  • 5
  • 25
  • 30