Skip to main content

Questions tagged [http-get]

HTTP GET is a request method which should be used to retrieve data and should not change state of the server.

Filter by
Sorted by
Tagged with
3142 votes
24 answers
2.4m views

HTTP GET with request body

I'm developing a new RESTful webservice for our application. When doing a GET on certain entities, clients can request the contents of the entity. If they want to add some parameters (for example ...
Evert's user avatar
  • 97.8k
1069 votes
31 answers
2.7m views

HTTP GET request in JavaScript?

I need to do an HTTP GET request in JavaScript. What's the best way to do that? I need to do this in a Mac OS X dashcode widget.
mclaughj's user avatar
  • 12.8k
654 votes
10 answers
755k views

OS X: equivalent of Linux's wget

How can I do an HTTP GET from a Un*x shell script on a stock OS X system? (installing third-party software is not an option, for this has to run on a lot of different systems which I don't have ...
SyntaxT3rr0r's user avatar
  • 28.1k
473 votes
4 answers
215k views

Are querystring parameters secure in HTTPS (HTTP + SSL)? [duplicate]

Do querystring parameters get encrypted in HTTPS when sent with a request?
Deep's user avatar
  • 5,962
411 votes
27 answers
262k views

When do you use POST and when do you use GET?

From what I can gather, there are three categories: Never use GET and use POST Never use POST and use GET It doesn't matter which one you use. Am I correct in assuming those three cases? If so, what ...
Thomas Owens's user avatar
335 votes
10 answers
457k views

Why am I getting an OPTIONS request instead of a GET request?

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript"></script> <script> $.get("http://example.com/", function(data) { alert(data); });...
Paul Tarjan's user avatar
310 votes
14 answers
459k views

When submitting a GET form, the query string is removed from the action URL

Consider this form: <form action="http://www.blabla.com?a=1&b=2" method="GET"> <input type="hidden" name="c" value="3" /> </...
user avatar
211 votes
7 answers
163k views

Cache an HTTP 'Get' service response in AngularJS?

I want to be able to create a custom AngularJS service that makes an HTTP 'Get' request when its data object is empty and populates the data object on success. The next time a call is made to this ...
Gavriguy's user avatar
  • 3,068
162 votes
6 answers
247k views

Is there a limit to the length of a GET request? [duplicate]

Is there a limit to the length of a GET request?
user avatar
161 votes
10 answers
153k views

http HEAD vs GET performance

I am setting-up a REST web service that just need to answer YES or NO, as fast as possible. Designing a HEAD service seems the best way to do it but I would like to know if I will really gain some ...
Asterius's user avatar
  • 2,200
142 votes
11 answers
88k views

Is GET data also encrypted in HTTPS?

When you GET https://encrypted.google.com/search?q=%s Is the %s query encrypted? Or just the response? If it is not, why should Google serve its public content also with encryption?
Jader Dias's user avatar
  • 89.8k
137 votes
5 answers
129k views

What 'sensitive information' could be disclosed when setting JsonRequestBehavior to AllowGet

I've been getting the same old error every time I test a new URL from my browser's address bar when I'm returning Json (using the built-in MVC JsonResult helper): This request has been blocked ...
A. Murray's user avatar
  • 2,801
128 votes
19 answers
206k views

How to correctly use axios params with arrays

How to add indexes to array in query string? I tried send data like this: axios.get('/myController/myAction', { params: { storeIds: [1,2,3] }) And I got this url: http://localhost/api/myController/...
Zin Kun's user avatar
  • 1,383
122 votes
7 answers
240k views

How to add parameters to a HTTP GET request in Android?

I have a HTTP GET request that I am attempting to send. I tried adding the parameters to this request by first creating a BasicHttpParams object and adding the parameters to that object, then calling ...
groomsy's user avatar
  • 4,955
101 votes
4 answers
66k views

Is it wrong to return 202 "Accepted" in response to HTTP GET?

I have a set of resources whose representations are lazily created. The computation to construct these representations can take anywhere from a few milliseconds to a few hours, depending on server ...
user359996's user avatar
  • 5,613
86 votes
3 answers
50k views

What is the difference between [AcceptVerbs(HttpVerbs.Post)] and [HttpPost]?

I can decorate an action either with the [AcceptVerbs(HttpVerbs.Post)]/[AcceptVerbs(HttpVerbs.Get)] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(string title) { // Do Something... } ...
Lorenzo's user avatar
  • 29.3k
78 votes
5 answers
158k views

Standardized way to serialize JSON to query string?

I'm trying to build a restful API and I'm struggling on how to serialize JSON data to a HTTP query string. There are a number of mandatory and optional arguments that need to be passed in the ...
Andreas's user avatar
  • 1,251
75 votes
5 answers
383k views

PHP cURL GET request and request's body

i'm trying using cURL for a GET request like this: function connect($id_user){ $ch = curl_init(); $headers = array( 'Accept: application/json', 'Content-Type: application/json', )...
Filippo oretti's user avatar
66 votes
6 answers
143k views

Writing image to local server

Update The accepted answer was good for last year but today I would use the package everyone else uses: https://github.com/mikeal/request Original I'm trying to grab google's logo and save it to my ...
Mark's user avatar
  • 33.1k
63 votes
9 answers
115k views

How to add query parameters to a HTTP GET request by OkHttp?

I am using the latest okhttp version: okhttp-2.3.0.jar How to add query parameters to GET request in okhttp in java ? I found a related question about android, but no answer here!
Jerikc XIONG's user avatar
  • 3,577
57 votes
5 answers
79k views

What is the difference between a HTTP-Get and HTTP-POST and why is HTTP-POST weaker in terms of security

Can anyone explain the difference between a HTTP-GET and HTTP-POST? And why do people say that a HTTP-POST is weaker in terms of security?
Brandon Michael Hunter's user avatar
55 votes
2 answers
166k views

How can I use HTTP GET in PowerShell? [duplicate]

Possible Duplicate: Get $webclient.downloadstring to write to text file in Powershell Powershell http post with .cer for auth I have an SMS system that provides me the ability to send an SMS from ...
alex's user avatar
  • 966
51 votes
6 answers
68k views

How can I check if request was a POST or GET request in Symfony2 or Symfony3

I just wondered if there is a very easy way (best: a simple $this->container->isGet() I can call) to determine whether the request is a $_POST or a $_GET request. According to the docs, A ...
dialogik's user avatar
  • 9,532
48 votes
7 answers
226k views

HTTP GET in VB.NET

What is the best way to issue a http get in VB.net? I want to get the result of a request like http://api.hostip.info/?ip=68.180.206.184
notandy's user avatar
  • 3,320
48 votes
4 answers
98k views

HttpPost vs HttpGet attributes in MVC: Why use HttpPost?

So we have [HttpPost], which is an optional attribute. I understand this restricts the call so it can only be made by an HTTP POST request. My question is why would I want to do this?
Shane Courtrille's user avatar
47 votes
7 answers
164k views

How do I print the content of httprequest request?

I've got a bug involving httprequest, which happens sometimes, so I'd like to log HttpGet and HttpPost request's content when that happens. So, let's say, I create HttpGet like this: HttpGet g = new ...
Arsen Zahray's user avatar
45 votes
7 answers
277k views

How can I pass POST parameters in a URL?

Basically, I think that I can't, but I would be very happy to be proven wrong. I am generating an HTML menu dynamically in PHP, adding one item for each current user, so that I get something like <...
Mawg's user avatar
  • 39.6k
42 votes
5 answers
84k views

Passing a list of int to a HttpGet request

I have a function similar in structure to this: [HttpGet] public HttpResponseMessage GetValuesForList(List<int> listOfIds) { /* create model */ foreach(var id in listOfIds) ...
StormFoo's user avatar
  • 1,159
39 votes
2 answers
107k views

How to pass complex object to ASP.NET WebApi GET from jQuery ajax call?

I have the following complex object in JavaScript which contains filter options var filter={caseIdentifiter:'GFT1',userID:'2'}; which I want to pass to an ASP.NET MVC4 WebApi controller GET [...
ChrisP's user avatar
  • 10k
36 votes
5 answers
31k views

How can I use jQuery "load" to perform a GET request with extra parameters?

I'm reading the jQuery load documentation and it mentions that I can use load to perform a GET request by passing in extra parameters as a string. My current code with my parameters as key/value pair ...
Thierry Lam's user avatar
34 votes
8 answers
23k views

What are the advantages of using a GET request over a POST request?

Several of my ajax applications in the past have used GET request but now I'm starting to use POST request instead. POST requests seem to be slightly more secure and definitely more url friendly/...
fuentesjr's user avatar
  • 51.8k
32 votes
2 answers
16k views

How to call Firebase Callable Functions with HTTP?

I realised that the new Callable Cloud Functions can still be called as if they were HTTP events, i.e. they can still be reached under http://us-central1-$projectname.cloudfunctions.net/$functionname. ...
creativecreatorormaybenot's user avatar
32 votes
4 answers
125k views

How to use verb GET with WebClient request?

How might I change the verb of a WebClient request? It seems to only allow/default to POST, even in the case of DownloadString. try { WebClient client = new WebClient(); ...
FlavorScape's user avatar
  • 14.1k
30 votes
4 answers
80k views

synchronous http call in angularJS

I have the following scenario, I need data from a particular url. I have written a function which takes parameter 'url'. Inside the function I have the $http.get method which makes a call to the url. ...
clearScreen's user avatar
  • 1,012
28 votes
3 answers
62k views

REST API: GET request with body

I want to implement a REST API and need a body on my GET requests. (Like discussed here: HTTP GET with request body) Are there http clients which are not able to send a body with a GET request? ...
user437899's user avatar
  • 9,079
25 votes
1 answer
41k views

Send a GET request with a body in JavaScript (XMLHttpRequest) [duplicate]

I have to interact with an API that takes parameters from the body of a GET request. I know this might not be the best idea, but it is the way the API was built. When I try building a query with ...
Andrei Savin's user avatar
  • 2,444
24 votes
2 answers
37k views

HTTP Status 405 - HTTP method is not supported by this URL

I have the following servlet: public class MyServlet extends HttpServlet { private static final long serialVersionUID = 16252534; private static int ping = 3000; private Thread t; ...
CeccoCQ's user avatar
  • 3,756
24 votes
4 answers
44k views

The type or namespace name 'HttpGet' could not be found when add 'System.Web.Http' namespace

I have one issue in MVC . Currently I am working in MVC and the version is MVC4 . And I have 2 ActionResult Method, see below [HttpGet] public ActionResult About() { ViewBag....
Ramesh Rajendran's user avatar
24 votes
2 answers
15k views

Using grequests to make several thousand get requests to sourceforge, get "Max retries exceeded with url"

I am very new to all of this; I need to obtain data on several thousand sourceforge projects for a paper I am writing. The data is all freely available in json format at the url http://sourceforge.net/...
crf's user avatar
  • 1,880
21 votes
1 answer
17k views

Custom Model Binder for ASP.NET MVC on GET request

I've created a custom MVC Model Binder which gets called for every HttpPost that comes into the server. But does not get called for HttpGet requests. Should my custom model binder get called during a ...
Niels Filter's user avatar
  • 4,530
20 votes
6 answers
20k views

What is "name" property in the constructor for HttpGetAttribute?

When I use HttpGet(...), intellisense tells me that besides the first argument, i.e. pattern, I also have name and order. While the latter is obvious to me, I got a bit uncertain on what the parameter ...
Konrad Viltersten's user avatar
19 votes
4 answers
52k views

How can I check if request was a POST or GET request in codeigniter?

I just wondered if there is a very easy way to determine whether the request is a $_POST or a $_GET request. So does Codeigniter have something like this? $this->container->isGet();
hecontreraso's user avatar
  • 1,270
19 votes
7 answers
52k views

No Source Code is available for type : GWT Compilation Error

I am trying to make get requests by a servlet in my GWT application. On compiling the code I am getting these errors. [ERROR] Line 16: No source code is available for type org.apache.http.client....
Saurabh Saxena's user avatar
19 votes
1 answer
53k views

How to map a response from http.get to a new instance of a typed object in Angular 2 [duplicate]

I'm trying to get an understanding in how to map the result from a service call to an object using http.get and Observables in Angular 2. Take a look at this Plunk In the method ...
Magnus Wallström's user avatar
19 votes
3 answers
19k views

URL Length limitation of Microsoft Edge

does anybody know URL length limitation for Microsoft Edge? As you know, Internet Explorer has limitation for URL length, Maximum length is 2048. How about Edge? I guess, it should be gone for now...
yoshi0309's user avatar
  • 191
18 votes
4 answers
46k views

Response.Redirect which POSTs data to another URL in ASP.NET

I want to redirect a response to another URL while it contains some POST data in it's HTTP header. // Inside an ASP.NET page code behind: Response.Redirect("http://www.example.com/?data=sent%20via%...
Xaqron's user avatar
  • 30.6k
17 votes
2 answers
44k views

"Type 'Object' is not assignable to type" with new HttpClient / HttpGetModule

Following Google's official Angular 4.3.2 doc here, I was able to do a simple get request from a local json file. I wanted to practice hitting a real endpoint from JSON placeholder site, but I'm ...
midnightnoir's user avatar
16 votes
3 answers
27k views

How do I issue an HTTP GET from Excel VBA for Mac

I need to issue an HTTP Get with a query string to a web service from Excel for Mac 2011. I've seen the answers for using QueryTables (How can I send an HTTP POST request to a server from Excel using ...
John Stephens's user avatar
16 votes
5 answers
102k views

Multiple HTTP GET parameters with the same identifier

Let's say I am getting requests such as: http://www.example.com/index.php?id=123&version=3&id=234&version=4 Is it possible to extract these in a simple way inside my php code? I realize ...
MatsT's user avatar
  • 1,769
15 votes
6 answers
85k views

How to validate and sanitize HTTP Get with Spring Boot?

I keep getting this annoying error from Checkmarx code scanner, Method getTotalValue at line 220 of src\java\com\example\PeopleController.java gets user input for the personName element. This ...
john's user avatar
  • 697

1
2 3 4 5
33