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
1
vote
1 answer

for http request to google maps API

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=(API_KEY) Google API page said the above URL is the http request and a json string is the response. How do I do this in javascript? I tried…
1
vote
0 answers

magento use HTTP request get real response

I create a payment solution to send a HttP request to the payment gateway, In the block/redirect.phtml protected function _toHtml() { ... $formHTML = $form->toHtml(); $html = ''; $html.= '
1
vote
0 answers

Post request using loopj AysyncHttpClient android library

When trying to post into a google cloud endpoint via REST I get org.apache.http.client.HttpResponseException: Bad Request when trying using http://loopj.com/android-async-http/ on my android app. I have made this post in POSTMAN REST client without…
1
vote
1 answer

Why does request.ParseForm() drain the request.Body?

In this code, if I comment the ParseForm() invocation the request works as expected package main import ( "fmt" "net/http" "net/url" "strings" ) func main() { v := make(url.Values) v.Set("status", "yeah!") request,…
OscarRyz
  • 196,001
  • 113
  • 385
  • 569
1
vote
2 answers

Android - Volley set specific port

A pretty simple question, but failed to find any proper answer for it; Is it possible to set a specific port to use when doing a (GET) http request with Volley as library?
Stefan de Bruijn
  • 6,289
  • 2
  • 23
  • 31
1
vote
0 answers

Same HTTP Requests, different HTTP Headers

I'm working on a Node.js app (allowed in Heroku) which makes a response.write() and writes a JSON text. With hurl.it tool I can test these http requests and I can't understand why in the same http request, sometimes appear the first header or…
alex_unio
  • 325
  • 5
  • 13
1
vote
1 answer

using httpRequest headers?

byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes(message); request.Method = "POST"; request.ContentType = "text/xml;charset=utf-8"; request.ContentLength = requestBytes.Length; request.Headers.Add(string.format("infoAsString, {0}",…
John
  • 3,965
  • 21
  • 77
  • 163
1
vote
2 answers

Can't send both get and post http requests via html-forms on perl

I have switch-structure on my site. I work with get requests and I load different scripts, depending on what was in the query. There are switch-instruction in script. For example. Link: site.com/ - printing something like 'press some menu…
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87
1
vote
1 answer

Java PubMed blocks url requests

I have some code that accesses articles in PubMed and parses some information from each XML. The program works fine on my computer, but needs a lot of time to finish. So when i run it on a unix machine especially for this kind of things, every…
1
vote
1 answer

Minimal cross domain ajax example that forces preflight OPTIONS

So, I am trying to combine cross domain services and basic authentication in a server built with Express. For a specific route I am using on the client side the following ajax call: $.ajax({ type: "PUT", accepts: "application/json", url:…
MightyMouse
  • 13,208
  • 8
  • 33
  • 43
1
vote
1 answer

LWP::UserAgent and HTTP::Request for a POST request

In a certain script I tried to write this: my $ua = LWP::UserAgent->new; my $res = $ua->post($url, Content => $data); and got "400 Bad Request". After some reading I tried this: my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new( 'POST',…
szabgab
  • 6,202
  • 11
  • 50
  • 64
1
vote
0 answers

dotnetopenauth.messaging.httprequestinfo' does not contain a constructor that takes 4 arguments

I use asp.net mvc3 with razor code.I'm trying this authcontroller. HttpRequestInfo clientResponseInfo = new HttpRequestInfo("GET", auth, headers, null); I get a redline below HttpRequestInfo says "dotnetopenauth.messaging.httprequestinfo' does…
gs11111
  • 649
  • 2
  • 17
  • 49
1
vote
1 answer

Minimize http requests of jQuery ajax parsing

I created the function below, which basically parses the HTML of a given url, scans for a certain class and process the text that it finds: A small sample of my function: function displayRating(theID){ var $theUrl = $('#' + theID + ' >…
otinanai
  • 3,987
  • 3
  • 25
  • 43
1
vote
0 answers

Create an Excel Bell Curve for requests per second

I run into this all the time. Server X is expected to handle Y transactions per day. Where Z% of transactions will occur over N hours. What's the simplest way to create a bell curve \ graph in excel showing the requests per second. I've looked up…
Warrick FitzGerald
  • 2,455
  • 3
  • 23
  • 31
1
vote
0 answers

MongoDB native HttpClient

I'm looking for a way to obtain a HTTP-respone from my REST-service that returns me a JSON object, evaluate it and save it inside my Mongo's stored procedure. Does anybody know how to do this? I've noticed that MongoDB has a native HttpClient but it…