Questions tagged [get]

The HTTP protocol supports numerous request methods, and among them is the GET method. GET is employed by the client when it intends to obtain data from the server as an element of the request-URI.

Testing my node.js application with Postman

Currently, I'm utilizing the Postman extension on Chrome to test out my Node.js (express module) application. The goal is for the program to accept user input through Postman and retrieve specific information from within the program based on that input. I ...

Restrict the number of GET requests made using D3.js and the Twitter API

Currently, I have made adjustments to my D3.js chart by switching from mouseover/mouseout events to mousemove. While this change has caused several issues in the chart, the most significant one pertains to my GET statuses/show/:id requests. In the past, h ...

Steps for sending a request to the root resource

I've encountered a problem that stems from my limited knowledge of Express. Despite creating a project with Express, I'm unable to make calls to the root, only to the routes. I suspect the issue lies in my usage of app.use(...). app.js var index = requir ...

Navigating through elements in Angular

I am working with multiple Angular components housed within a display:flex div container. I am fetching datatable from an API, and it contains the same number of rows as there are components. Each row in the datatable corresponds to data for each compone ...

Is there a way to retrieve the name associated with the ID or organize them in a specific order?

I have encountered a major issue for which I am unable to find a solution. The problem at hand is related to retrieving the name of a hero using their ID from a JSON object returned by an API. [ { "id":0, "name":"N/A" }, { "id":1, "name":"John" }, { "id" ...

How to efficiently send multiple objects in response to a single GET request with Express and Node.js

The code snippet I am working with looks like this - sendServer.get('/download',function(request,response){ var status="SELECT * from poetserver.download where status='0'"; console.log(status) connection.query(status,function(error,ro ...

Retrieving web services with parameters in Xamarin

Hi there, I'm new to using xamarin and I need to incorporate some JSON data with a web service call. I've attempted the following: var response = await client.GetAsync("myurl" + "?applicationid=" + applicationId + "?siteid=" + siteId + "?userid=" + ...

Every time I use Get for ajax calls, I keep getting hit with a frustrating

Initially, I was making a call to a [web method] using the POST method. However, since I need to receive data back, I attempted to switch to using the GET method instead. The previous implementation using POST was successful. Unfortunately, using GET resu ...

jQuery.get() function is limited to specific types of webpages

I have successfully combined multiple weather APIs on my website, which can be found here. Recently, I started using the weather.gov API and it has been quite effective. However, there are certain data points that I need to extract which the weather.gov A ...

Attempting to transmit a pair of parameters from an HTML form through Flask (within a URL) in order to subsequently execute in a Python script

As a newcomer, I am working on a Python algorithm that requires two parameters obtained from an HTML form. Here is the snippet of my HTML code: <form action="result/"> <p><input class="w3-input w3-padding-16" method ...

What is the process for verifying a particular user in AngularJS?

I'm new to AngularJS and I'm a bit confused about the concepts of GET, PUT requests. I am currently working on an app where I display a list of users on one page, and on another page, I have a form with three buttons. My main focus is on the "Con ...

What could be the reason for my AngularJS $http.get call with parameters not retrieving the expected filtered outcomes?

Forgive me if this seems like a silly question. I'm currently using a $http.get() request in my client controller to fetch objects based on a specific id. Any guidance would be greatly appreciated. Thank you in advance! $http .get('api/offer ...

Having an Issue with the jQuery .get Method

Here is some HTML code I have <ul> <li> <a href='#' class='approch' alt='1' > 111111 </a> </li> <li> <a href='#' class='approch' alt='2' > 222222 </a> </li> <li> <a href='#' class='appro ...

The AJAX request to send data to PHP is not functioning correctly

I have an issue where I am trying to send data to my server using AJAX in PHP. Even though I have set the method as POST, it seems to be executing as a GET request instead. Here is the code snippet: $.ajax({ type: 'POST', data: { user: user }, ur ...

Error: The method $scope.weatherAPI.get is not recognized as a function

weatherApplication.controller('forecastController', ['$scope', '$http','$resource', '$routeParams', 'cityProviderService','$sce',function($scope, $http,$resource, $routeParams, cityProviderService,$sce) { $scope.selectedCity = cityPr ...

Eliminating .php from the URL and the GET request

After implementing .htaccess, I successfully transformed the URL: http://www.websitename.co.uk/directory/users.php?id=idValue&data2=data2Value Into http://www.websitename.co.uk/directory/users?id=idValue&data2=data2Value HTAccess: RewriteE ...

Combining link and button clicks into a single HTTP request

While working on my localhost, I encountered an interesting scenario. Imagine you have the following HTML code: <form action="" method="POST"> <input type="submit" name="submitButton" id="submitButton"> </form> <a onclick="click ...

Trouble transferring $rootScope.currentUser between AngularJS profile and settings page

I am in the process of setting up a site using Angular, Express, Node, and Passport. Currently, I am configuring Angular to monitor the $rootScope.currentUser variable with the following code: app.run(function ($rootScope, $location, Auth) { // Watch ...

Step-by-step guide on making a GET request with Java Spark

For my Java Spark project, I need to access a third-party API The API endpoint for a GET request is: I am seeking guidance on how to connect to this API using Java Spark and handle the response Upon attempting to access the API, the response returned wa ...

Error: The Node Express Server is unable to locate the requested resource at "/

const http = require("http"); const myApp= require('./myApp'); const portNumber = 8080; const myServer = http.createServer(myApp); myServer.listen(portNumber) ...

Roughly one out of every 500 users tend to send GET requests instead of POST

We have implemented the following AjaxSetup configurations: $.ajaxSetup( { cache: false, type: 'POST', contentType: "application/json", data: "{}", headers: { "Accept": "application/json; charset=utf-8" }, beforeSend: fun ...

What is the best way to retrieve information from an http website and display it in an html table using javascript

I am attempting to retrieve data from the specified site: . The website appears to feature a list of objects, and my goal is to extract each object enclosed in {} into separate columns within a row (6 columns total - one for gameNumber, one for teams, and ...

What is the best way to handle a GET request from a client in Node.js and send back HTML in response?

I am currently working on a Node.js application that responds to an AJAX (jQuery) $.get() request from a Web page by sending some HTML back to that page. The application utilizes Express. In the server code, I have: app.get('/friends', api.frie ...

differences between using form's get method and sending an angular $http.get request

When trying to make a GET request to a specific URL from my Angular frontend to an ExpressJS backend, I encountered some interesting behavior. In the frontend code snippet below: <li> <a ng-click="givequiz()">GiveQuiz</a> </l ...

Does Openerp or Odoo utilize ajax to transmit POST and GET data seamlessly, without the need for page refresh?

Curious about the technology behind ODOO (Openerp) that allows for sending POST and GET data without refreshing the page - surprisingly, there seems to be no visible AJAX code! ...

Guide on displaying JSON information upon clicking using JavaScript

I'm having difficulty writing the logic for this code. I have extracted data from a vast API. The current code fetches all program titles (some may be repeated) and compares them with an array of late night shows, then displays them once in their own ...

Preserve query parameters in Laravel 5.3 when passing additional GET values

Is there a way to maintain the values passed from another route on my dashboard? Here is how the dashboard URL appears after receiving a GET request from another route: http://localhost:8000/?lat=45.328686399999995&lng=14.446922599999999 Whe ...

What could be the reason why the editMessageText function in the Telegram API does not seem to work when the message contains a Custom Keyboard

Currently, I am working on developing a Telegram Bot that relies on POST/GET JSON queries with a custom Keyboard feature. One of the functionalities I need to implement is the ability to modify the text of messages sent by the bot using the editMessageText ...

Set a custom primary key for myself and enforce the exclusion of the default _id field in MongoDB

I have a couple of queries: 1- I need to retrieve data from the database using an ID, but the operation is based on the automatically generated key by MongoDB (e.g. _id). Instead, I want to search based on a field that I created myself like id. To achieve ...

Issue encountered during retrieval of data from Steam marketplace

My goal is to retrieve the item price information for a single item on the steam market through a GET request. Below is the angularJS script I am currently using: <script> var app = angular.module('csgo', []); app.controller('MainCtr ...

Continuously send AJAX requests using jQuery until the files have been found

Does anyone know how to continuously listen for an AJAX response from a server-side file using jQuery? The issue arises when the file is only generated after a post request is made from another computer or browser. I need a solution that prevents a 404 e ...

How can the Header of a get-request for an npm module be modified?

Currently, I am utilizing an npm module to perform an API request: const api_req = require('my-npm-module-that-makes-an-api-request'); However, I am seeking a way to modify the user-agent used for requests generated internally by the npm module ...

Increase the value of a PHP variable using a GET request

This PHP file is responsible for sending push notifications via GCM. Recently, I attempted to introduce a new variable called "val" into the file. However, it seems like there was an error in doing so, as the file is currently not functioning correctly. ...

Navigating to a different webpage using jQuery

There's a quick and easy solution that I'm familiar with but can't recall at the moment. I'm looking to utilize the jQuery get method in a different way - not asynchronous or synchronous. Instead, I want to post the entire page when re ...

What are the steps to decode a JSON response using jQuery?

Working on a fun little web app for my significant other and me to keep track of movies we want to watch together. I'm exploring using TheMovieDatabase.org's API (which only supports JSON) to simplify the process of adding movies to our list. The ...

Can you explain the distinction between incorporating the Express GET method and HTTPS GET method in the provided code snippet?

const express = require("express"); const app = express(); const https = require("https"); app.get("/", function (req, res){ var url = "https://example.com"; https.get(url, function(response){ ...

Update the URL by adding additional parameters for increased functionality

I have made some changes to these URLs http://deia.info/category/calendar/10/ Now they look like this: /index.php?task=browse_posts&catid=$2 I achieved this using the following code in the .htaccess file: RewriteRule ^category/(.+)/(.+) /index.php?ta ...

URL not passing on variable

Here is the code I have for a basic 'change email' script. I'm currently struggling to get it working and can't figure out what's wrong. <?php if (isset($_GET['u'])) { $u = $_GET['u']; } if (isset($_POST['e'])) { var_dump($_GET); $e = $_POST[ ...

Converting a string parameter into a JSON stringified object in Express.js

Struggling with creating a query parameter to stringify a JSON object. Does anyone have any tips or solutions? ...

Tips for sending an Ajax request to a separate URL on the same server

When making an ajax request to my server, I use the following code: var data = ''; $.ajax({ type: 'GET', url: 'api/getnews/home/post/'+title, data: data, datatype: 'json', success: function (data) { var obj = JSO ...

The Ajax request encountered a failure exclusively when running on the localhost server

There seems to be an issue with my ajax login call: $.ajax({ url: url_to_ajax, success: function ( data ) { switch (data) { case "-2": input1.addClass("has-error"); break; cas ...

When I click the button, it deletes the DOM element and hides it, preventing me from

I'm facing a simple issue that I can't quite wrap my head around. Whenever I input a value into the form and click the button to run the function, the 'loading' element disappears and doesn't reappear. Here is the JavaScript code in question: <div> ...

Retrieving data with long parameters from a WebAPI GET request

Whenever I make a GET request to WebAPI using AJAX, I keep getting a 400 - Bad Request error. I have come to understand that this happens because the URL I am using is too long; the parameter I need to pass looks something like this: 1739;1591;2021;747 ...

Fetching data using JSONRequest sample code

I am new to web development and this is my first attempt at using JSON. On the JSON website (http://www.json.org/JSONRequest.html), they recommend using JSONRequest.get for certain tasks. However, I keep running into an error stating "JSONRequest is not ...

Is there a way to prevent Express from automatically converting the '+' character in query strings to spaces when making a GET request?

During a GET request, I am including specific parameters in the query string such as HOST?email=john**+[email protected]. However, when trying to retrieve these values in my Node Express server using req.query.email, the value received is 'john [ema ...

Methods for verifying data in php (with the utilization of the GET method)

I am currently working on a project involving the use of Module SIM 808 and a web server. For transferring data to my website, I have utilized the GET method where the data is sent through the URL. Example: www.mywebsiteaddress/?data1=sensor1_value&d ...

Obtain information from the get request route in Node.js

I've been diving into nodejs and databases with the help of an online resource. As part of my learning process, I have been tasked with replicating the code below to fetch data from app.use('/server/profil'); However, I'm encountering ...

When I pass an array of objects to Firefox (using TypeScript) and retrieve the data, I find that I am unable to retrieve it in the form of an array of objects

When it comes to saving and retrieving data from a Firebase database, I seem to be encountering an issue where the type of data retrieved does not match what I am expecting. Let me break down what I am doing and the problem I am facing: Saving data To sa ...

Storing the data retrieved from an HTTP GET request in Ionic 2

I've been working on developing an app and have successfully set up an event provider. Utilizing the Eventbrite API, I am able to retrieve a list of events taking place in a specific city. However, I'm facing challenges when attempting to execute the get r ...

Angular's GET request response is returning an "Undefined" value instead of the

As an Angular beginner, I've successfully set up and tested a service that retrieves data from a JSON file using the Get method. However, when attempting to access the data inside the JSON file, it returns as undefined. My goal is to use this data as an ob ...

Encountering an issue while attempting to make an API GET request using JSON and Python

Encountering an issue with my API get request using JSON RESTful services and Python3. Any assistance would be greatly appreciated. The API instructions I am following can be found on this website . I have the CVE number already, as it's included in the ...

Unable to access the router while attempting to connect through express

I am facing an issue with implementing routers in my Node.js application. I am unable to successfully execute the router.get function. In the main server file, which is named server.js, I have included the following script: // Routes app.use('/api/v1 ...

Using jQuery AJAX enforces the use of HTTPS

Here is the current setup: Using jquery version 2.1.1 Employing nodejs (not a crucial factor) Making requests over https The issue at hand: When using $.getJSON() and $.get(), the URL requested appears as "". Despite confirming the correctness of the UR ...

Angular is unable to start the variable_INITIALIZation process

I've created a method called get that returns data of type ProductModel. getProduct(id:number): Observable<ProductModel[]> { const url = `${'api/product/getProductById/'}/${id}`; return this.http.get<ProductModel[]>(url).pipe( ...