Questions tagged [get]

GET is one of many request methods supported by the HTTP protocol. The GET request method is used when the client needs to get data from the server as part of the request-URI.

GET is one of many request methods supported by the HTTP protocol. The GET request method is used when the client needs to get data from the server as part of the request-URI.

See also: ,

17143 questions
177
votes
16 answers

PHP Get all subdirectories of a given directory

How can I get all sub-directories of a given directory without files, .(current directory) or ..(parent directory) and then use each directory in a function?
Adrian M.
  • 7,183
  • 15
  • 46
  • 54
175
votes
7 answers

How to set timeout for http.Get() requests in Golang?

I'm making a URL fetcher in Go and have a list of URLs to fetch. I send http.Get() requests to each URL and obtain their response. resp,fetch_err := http.Get(url) How can I set a custom timeout for each Get request? (The default time is very long…
pymd
  • 4,021
  • 6
  • 26
  • 27
170
votes
14 answers

Use jQuery to get the file input's selected filename without the path

I used this: $('input[type=file]').val() to get the file name selected, but it returned the full path, as in "C:\fakepath\filename.doc". The "fakepath" part was actually there - not sure if it's supposed to be, but this is my first time working…
marky
  • 4,878
  • 17
  • 59
  • 103
170
votes
8 answers

get all keys set in memcached

How can I get all the keys set in my memcached instance(s)? I tried googling, but didn't find much except that PHP supports a getAllKeys method, which means it is actually possible to do this somehow. How can I get the same within a telnet…
Anshul Goyal
  • 73,278
  • 37
  • 149
  • 186
154
votes
2 answers

Sending a JSON to server and retrieving a JSON in return, without JQuery

I need to send a JSON (which I can stringify) to the server and to retrieve the resulting JSON on the user side, without using JQuery. If I should use a GET, how do I pass the JSON as a parameter? Is there a risk it would be too long? If I should…
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
154
votes
9 answers

Python requests library how to pass Authorization header with single token

I have a request URI and a token. If I use: curl -s "" -H "Authorization: TOK:" etc., I get a 200 and view the corresponding JSON data. So, I installed requests and when I attempt to access this resource I get a 403 probably…
user1552586
154
votes
4 answers

How do I do a HTTP GET in Java?

How do I do a HTTP GET in Java?
David
150
votes
14 answers

Getting "TypeError: Failed to fetch" when the request hasn't actually failed

I'm using fetch API within my React app. The application was deployed on a server and was working perfectly. I tested it multiple times. But, suddenly the application stopped working and I've no clue why. The issue is when I send a get request, I'm…
Amanshu Kataria
  • 2,838
  • 7
  • 23
  • 38
147
votes
9 answers

404 error for Google Tag Manager

Google Tag Manager told me to put this underneath the opening body tag.