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
67
votes
13 answers

Get only filename from url in php without any variable values which exist in the url

I want to get filename without any $_GET variable values from a URL in php? My URL is http://learner.com/learningphp.php?lid=1348 I only want to retrieve the learningphp.php from the URL? How to do this? I used basename() function but it gives all…
sqlchild
  • 8,754
  • 28
  • 105
  • 167
66
votes
2 answers

How to send error http response in express/node js?

So in login page I am sending credentials from angular to express through get request.What I wanna do is that if found in database,send response and handle it in angular else if not found in db I want express to send error response and handle it…
Mohammed Gadiwala
  • 1,923
  • 2
  • 18
  • 26
66
votes
13 answers

How to get an input text value in JavaScript

How go get an input text value in JavaScript?
Maria
  • 3,455
  • 7
  • 34
  • 47
65
votes
5 answers

How to use HttpClient to send content in body of GET request?

Currently to send a parameterized GET request to an API interface I am writing the following code: api/master/city/filter?cityid=1&citycode='ny' But I see that there is a limit on the URL length of 2,083 characters. To avoid this I would like to…
John
  • 941
  • 2
  • 12
  • 20
65
votes
5 answers

How to make an HTTP GET request manually with netcat?

So, I have to retrieve temperature from any one of the cities from http://www.rssweather.com/dir/Asia/India. Let's assume I want to retrieve of Kanpur's. How to make an HTTP GET request with Netcat? I'm doing something like this. nc -v…
Avinash Bhawnani
  • 761
  • 1
  • 6
  • 7
65
votes
5 answers

Curl and PHP - how can I pass a json through curl by PUT,POST,GET

I have been working on building an Rest API for the hell of it and I have been testing it out as I go along by using curl from the command line which is very easy for CRUD I can successfully make these call from the command line curl -u…
Gilberg
  • 2,514
  • 4
  • 31
  • 41
64
votes
11 answers

How to use Go with a private GitLab repo

GitLab is a free, open-source way to host private .git repositories but it does not seem to work with Go. When you create a project it generates a URL of the form: git@1.2.3.4:private-developers/project.git where: 1.2.3.4 is the IP address of the…
James Fremen
  • 2,170
  • 2
  • 20
  • 29
61
votes
17 answers

How do I select between the 1st day of the current month and current day in MySQL?

I need to select data from MySQL database between the 1st day of the current month and current day. select*from table_name where date between "1st day of current month" and "current day" Can someone provide working example of this query?
Nurlan
  • 2,860
  • 19
  • 47
  • 64
60
votes
7 answers

post and get with same method signature

In my controller I have two actions called "Friends". The one that executes depends on whether or not it's a "get" versus a "post". So my code snippets look something like this: // Get: [AcceptVerbs(HttpVerbs.Get)] public ActionResult Friends() { …
codette
  • 12,343
  • 9
  • 37
  • 38
60
votes
6 answers

Check if request is GET or POST

In my controller/action: if(!empty($_POST)) { if(Auth::attempt(Input::get('data'))) { return Redirect::intended(); } else { Session::flash('error_message',''); } } Is there a method in Laravel to check if the…
JoeLoco
  • 2,116
  • 4
  • 31
  • 59
58
votes
9 answers

jquery how to use multiple ajax calls one after the end of the other

I am in mobile app and I use multiple Ajax calls to receive data from web server like below function get_json() { $(document).ready(function() { $.ajax({ url: 'http://www.xxxxxxxxxxxxx', data: { …
kosbou
  • 3,919
  • 8
  • 31
  • 36
58
votes
4 answers

PHP - Get array value with a numeric index

I have an array like: $array = array('foo' => 'bar', 33 => 'bin', 'lorem' => 'ipsum'); echo native_function($array, 0); // bar echo native_function($array, 1); // bin echo native_function($array, 2); // ipsum So, this native function would return a…
thom
  • 581
  • 1
  • 4
  • 3
56
votes
6 answers

Steps to send a https request to a rest service in Node js

What are the steps to send a https request in node js to a rest service? I have an api exposed like (Original link not working...) How to pass the request and what are the options I need to give for this API like host, port, path and method?
vinod
  • 8,350
  • 9
  • 32
  • 36
54
votes
6 answers

How to format a URL to get a file from Amazon S3?

I am having some trouble figuring out how to access a file from Amazon S3. Lets say that the bucket that the file lives in is BUCKET_NAME, the file is FILE_NAME, etc. I have tried the following two…
user1018928
  • 551
  • 1
  • 4
  • 5
54
votes
4 answers

How to pass boolean variable of false in a URL

I cannot work out how to pass a variable with a boolean value of false through a URL string. What is the correct method? domain/page?test=false domain/page?test= domain/page?test=0
Benjen
  • 2,835
  • 5
  • 28
  • 42