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
16
votes
3 answers

Swift: HTTP request with parameters in header

i need to send an HTTP request, I can do that but my API in Backendless requires application-id and secret-key in HTTP Request Header. Can you help how to add it into my code? Thanks let urlString = "https://api.backendless.com/v1/data/Pub" let…
16
votes
1 answer

Get HTTP request and tolerate 500 server error in powershell

In Powershell v3.0 I would like to return the response code from an HTTP GET, such as 200 OK or 500 Internal Server Error. (This is for a hack-deploy to do a quick warmup of a deployed site and see if it works, a sort of a mini acceptance test. The…
ErikE
  • 48,881
  • 23
  • 151
  • 196
15
votes
1 answer

Send HTTP request from different IPs in Node.js

Is there a way to send an HTTP request with a different IP from what I have in Node.js? I want to send a request from an IP that I choose before, and not from the IP of the server or from my computer’s IP. I know that Tor Project does this kind of…
user3050837
  • 151
  • 1
  • 1
  • 3
14
votes
1 answer

How to POST JSON data in body with Jenkins http-request plugin and Pipeline?

With v1.8.10 of the http-request plugin for Jenkins (I'm running 1.643), there is now support for POSTing a body in the request -- so this thread does not apply. I am wondering how to use this functionality in a Pipeline (v2.1) Groovy script? The…
user
  • 4,651
  • 5
  • 32
  • 60
14
votes
1 answer

HTTP pipelining request text example

Below is an example HTTP 1.1 call with a single page requested : GET /jq.js HTTP/1.1 Host: 127.0.0.1 Accept: */* I understand with HTTP Pipelining, multiple requests can be sent without breaking the connection. Can someone post, some text example…
DMin
  • 10,049
  • 10
  • 45
  • 65
13
votes
4 answers

urllib2 - post request

I try to perform a simple POST-request with urllib2. However the servers response indicates that it receives a simple GET. I checked the type of the outgoing request, but it is set to POST. To check whether the server behaves like I expect it to,…
Zakum
  • 2,157
  • 2
  • 22
  • 30
13
votes
1 answer

Unknown encoding: idna in Python Requests

I'm using Python Requests. All works great but today I get this strange error: [...] File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/requests/models.py", line 321, in full_url netloc =…
ierror
  • 513
  • 2
  • 6
  • 13
13
votes
4 answers

Is there a way to attach Ruby Net::HTTP request to a specific IP address / network interface?

Im looking a way to use different IP addresses for each GET request with standard Net::HTTP library. Server has 5 ip addresses and assuming that some API`s are blocking access when request limit per IP is reached. So, only way to do it - use another…
Dan Sosedoff
  • 2,869
  • 5
  • 28
  • 34
12
votes
4 answers

How to tell if a Request is coming from a Proxy?

Is it possible to detect if an incoming request is being made through a proxy server? If a web application "bans" users via IP address, they could bypass this by using a proxy server. That is just one reason to block these requests. How can this…
Josh Stodola
  • 81,538
  • 47
  • 180
  • 227
12
votes
4 answers

How do can you make redirect_to use a different HTTP request?

At the end of one of my controller actions I need to redirect to a page that only accepts put requests. I have been trying to figure out how to get redirect_to to use a put request but to no success. Is this possible? Or is there another way to…
vrish88
  • 20,047
  • 8
  • 38
  • 56
12
votes
2 answers

HTTP requests and Apache modules: Creative attack vectors

Slightly unorthodox question here: I'm currently trying to break an Apache with a handful of custom modules. What spawned the testing is that Apache internally forwards requests that it considers too large (e.g. 1 MB trash) to modules hooked in…
pinkgothic
  • 6,081
  • 3
  • 47
  • 72
12
votes
2 answers

HTTP requests trace

Are there any tools to trace the exact HTTP requests sent by a program? I have an application which works as a client to a website and facilitates certain tasks (particularly it's a bot which makes automatic offers in a social lending webstite,…
asliwinski
  • 1,662
  • 3
  • 21
  • 38
12
votes
2 answers

Django: Reading Array of JSON objects from QueryDict

How do I pass a composite JSON structure via AJAX call from JS and on the server side, read it as a "very similar" data structure in python? I understand that json formatting can be used (simplejson etc), but I somehow feel that the QueryDict itself…
rajivRaja
  • 527
  • 3
  • 6
  • 16
11
votes
2 answers

Making HTTP requests via Python Requests module not working via proxy where curl does? Why?

Using this curl command I am able to get the response I am looking for from Bash curl -v -u z:secret_key --proxy http://proxy.net:80 \ -H "Content-Type: application/json" https://service.com/data.json I have already seen this other post on proxies…
dalanmiller
  • 3,467
  • 5
  • 31
  • 38
10
votes
1 answer

Tornado - What is the difference between RequestHandler's get_argument(), get_query_argument() and get_body_argument()?

When to use RequestHandler.get_argument(), RequestHandler.get_query_argument() and RequestHandler.get_body_argument()? What is the use-case for each of them? Also what does the request.body and request.argument do in these cases? Which are to be…
1
2
3
23 24