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
9
votes
1 answer

Is it possible to enforce a max upload size in Plack::Middleware without reading the entire body of the request?

I've just converted a PageKit (mod_perl) application to Plack. This means that I now need some way to enforce the POST_MAX/MAX_BODY that Apache2::Request would have previously handled. The easiest way to do this would probably be just to put nginx…
oalders
  • 5,239
  • 2
  • 23
  • 34
9
votes
2 answers

How to send an HTTP request onbeforeunload in AngularJS?

I have a simple angular app that has two views that are loaded using ngRoute. I need to do some clean up on the server when the user navigates between views and when the user leaves the page (refreshes window, closes tab, or closes browser). My…
Levon Tamrazov
  • 530
  • 2
  • 9
  • 20
9
votes
2 answers

How to get form parameters in request filter

I'm trying to get the form parameters of a request in a request filter: @Override public ContainerRequest filter(final ContainerRequest request) { final Form formParameters = request.getFormParameters(); //logic return…
Paul Bellora
  • 54,340
  • 18
  • 130
  • 181
8
votes
1 answer

Getting a raw, unparsed HTTP response

Are there any straightforward ways to make a HTTP request and get at the raw, unparsed response (specifically the headers)?
Acorn
  • 49,061
  • 27
  • 133
  • 172
8
votes
0 answers

Sending multipart/form-data content with Postman Chrome extension

I'm struggling with creating POST multipart/mixed request with Postman Chrome extension. I keep getting HTTP 500. Already gone through this question, but sadly solution doesn't works for me. Here is my curl request which works for me. curl -H…
Aditya
  • 1,334
  • 1
  • 12
  • 23
8
votes
3 answers

Possible to specify async files in headers?

So my timeline always looks like this http://see.kirkstrobeck.com/TjQU/Screen%20Shot%202014-02-04%20at%206.40.14%20PM.png The index.html loads and then asks for other files. I was thinking is there a way to have the headers that respond to the…
Kirk Strobeck
  • 17,984
  • 20
  • 75
  • 114
8
votes
2 answers

Python Bottle how to read request parameters

I am using http://dingyonglaw.github.com/bootstrap-multiselect-dropdown/#forms to display a dropdown with multiple check boxes.
  • martincho
    • 4,517
    • 7
    • 32
    • 42
    8
    votes
    7 answers

    YSlow recommendations. How necessary are they?

    So I've just downloaded yslow for firebug and have taken a look at the results for a site I am building. I'm seeing recommendations, for example, to use ETags, cookie-free domain for my static components, and add expires headers. I'm thinking, well…
    Dave Archer
    • 3,022
    • 20
    • 23
    7
    votes
    3 answers

    Calculating Content-Length with Python

    I'm trying to make a post, however each time I did it, I would get a 411 response error. I'm using the requests library in python. In [1]: r.post(url) Out[1]: So then I specified the content length h = {'content-length' : '0'} and…
    tshauck
    • 20,746
    • 8
    • 36
    • 36
    7
    votes
    0 answers

    meteor multiform http post request

    I am pretty new to Web Dev, and Meteor, and all things REST, but I am trying to write a server side method to make a Meteor http post request to a third party server, and upload an image to it. I am having trouble setting it up correctly. I want to…
    home_wrecker
    • 365
    • 2
    • 11
    7
    votes
    3 answers

    Update Cookies in Session Using python-requests Module

    I'm using python-requests module to handle oAuth request and response. I want to set received access_token (response content as dict) in requests.session.cookies object. How can I update existing cookies of session with received response from…
    Yajushi
    • 1,175
    • 2
    • 9
    • 24
    6
    votes
    3 answers

    Google's speech recognition API in Objective-C

    i would like to use this Google API (for testing only): https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US My question is: how should I send a POST request to this URL? I'm using: NSArray *paths =…
    Smoothie
    • 261
    • 4
    • 11
    6
    votes
    1 answer

    Block HEAD requests to AWS Elastic Beanstalk and Elastic Load Balancer

    I have an AWS Elastic Beanstalk (Node.js) setup behind an Elastic Load Balancer and alerts setup for the load balancer. Each night I get tons of alerts for: Environment health has transitioned from Ok to Severe. 100.0 % of the requests are erroring…
    Anders
    • 3,198
    • 1
    • 20
    • 43
    6
    votes
    1 answer

    Laravel 5.2 : How to access Request & Session Classes from own Event Listener?

    In Laravel 5.2, i have added my Event Listener (into app\Providers\EventServiceProvider.php), like: protected $listen = [ 'Illuminate\Auth\Events\Login' => ['App\Listeners\UserLoggedIn'], ]; Then generated it: php artisan event:generate Then in…
    夏期劇場
    • 17,821
    • 44
    • 135
    • 217
    6
    votes
    4 answers

    Invalid URI: Invalid port specified in C# on specifying URL with port number in it like http://localhost:8080/jasperserver/rest

    I created a simple function to execute an Http PUT request - public string checkIfUserExists(string userName) { var endPoint = new Uri("http://localhost:8080/jasperserver/rest_v2/users/"+userName); var request =…
    Rookie
    • 341
    • 1
    • 4
    • 13
    1 2
    3
    23 24