Questions tagged [httprequest]

An HTTP request is an essential part of the request/response process, as defined by the HTTP specification. It can also be associated with an HttpRequest class found in software frameworks and libraries that streamline and automate related functionalities.

What is the best way to capture HTTP requests made by Python's Selenium WebDriver?

I am currently developing a web application using the Django-Gunicorn-Nginx stack for a closed community. To ensure security, I need to authenticate users against a third-party server during sign-up. However, since the third-party server does not have an o ...

How to retrieve the response body in C# using Unirest

Learn more about using Unirest for .Net at https://github.com/mashape/unirest-net/ Take a look at the code snippet below: Task<HttpResponse<MyClass>> response = Unirest.get("") .header("X-Mashape-Authorization", "") .asJsonAsync<My ...

The JSON object I'm sending to the server contains null values

My dilemma lies in sending text values to the server, which include name, phone number, location, and remarks. However, each time I attempt to send these values, one of them seems to be missing. For instance, sometimes the name doesn't go through, the ...

Ways to showcase a response in a subsequent activity

Currently, I'm developing a search module in my application. I previously asked for guidance on how to display JSON response in another activity (reference). I have successfully sent a request to the server and received a response containing some dat ...

Validating PUT/PATCH requests in Laravel 5.2's REST controller

I'm encountering an issue with Laravel that is resulting in a 405 MethodNotAllowedHttpException error. I've been attempting to implement validation for update requests in my resource PointController, but it seems that the validation rules defined in the @u ...

The command response.setHeader("Refresh", "0") failed to execute

My webpage needs to be refreshed when the user session has expired or the connection is not active. Despite trying various codes, I have been unsuccessful in achieving this. The last code snippet that I implemented is as follows: if(session.getAttribute(" ...

Performing a JSON POST Request: Steps for sending a POST request with JSON data format

I need to send the following data: { "contactsync": { "rev":4, "contacts":[ { "fields": [ { "value": { ...

Tips for correctly implementing Headers in AngularJS version 1.6

Currently, I am attempting to incorporate headers in a GET request using the $http method. This is the snippet of code that I have implemented: this.http.defaults.headers.common['Authorization'] = 'Bearer mytoken123123'; this.http.defaults.headers.common ...

Why does Apache keep saying GET not supported when I am trying to use the Post Method?

I am currently developing a small web/application to practice my skills in Spring Boot and Ajax. The web page I have includes a form with two date inputs, 'start date' and 'end date'. My goal is to send the user input to a RestController and display the r ...

Error: The JSON.parse method encountered an unexpected token 'h' at the beginning of the JSON string while trying to parse it

Here is the code snippet I wrote using Ionic framework: dialogflow(question) { let headers = new Headers(); headers.append('Content-Type','application/json'); return this.http.post('http://localhost:3000/api/dialogflow',question,{headers: head ...

Generate an object in Google Cloud Storage using the Text to Speech Response feature in Adalo

I'm currently developing an application using Adalo and have successfully created a custom action that generates a Text to Speech file. The API response includes "audioContent", which I now want to use in another API call to create a new object in Google C ...

Extracting PNG file from response (bypassing standard JSON extraction)

Despite my efforts to find a solution, I am still unable to resolve this specific issue: I have implemented an Angular request (localhost:4200) to an API on Spring (localhost:8080). The HttpService successfully handles the requests, except when it comes to ...

Using XMLHttpRequest with gzip compression

Utilizing the request module in node.js makes it simple to create a request that can retrieve and correctly decompress compressed data from the source: var request = require('request'); var requestOptions = { url: 'http://whatever.com/g ...

I'm puzzled as to why my HTTP request in Node.js is returning an empty body

Currently, I am facing an issue where I am sending a HTTP request to a server and expecting a response that contains all the necessary information. However, when attempting to parse the body using .parseJSON(), an exception is thrown indicating that the ...

Guide to Displaying HTTP POST Request Response on Pug Template

Whenever a user interacts with the form, I initiate an HTTP POST request to the database server. Subsequently, the database server sends a POST request back to the user's server. The issue I am facing is the inability to display this database result ...

JavaScript library called "Error: JSON input ended unexpectedly"

I am currently operating a server using node.js and Express v4.0 Additionally, I am utilizing the request library. However, when receiving a response from the server, I encounter an Uncaught SyntaxError: Unexpected end of JSON input. The response I receiv ...

Include personalized headers to the 'request'

I have configured my express server to proxy my API using the following setup: // Proxy api calls app.use('/api', function (req, res) { let url = config.API_HOST + req.url req.pipe(request(url)).pipe(res) }) In this instance, config.API_HOST ...

Can an Angular 9 application access an uploaded file through an HTTP request from the $_FILES array?

I'm currently facing an issue when attempting to send a file to a PHP server using an HTTP request in Angular 9. The problem lies in the fact that the server is not able to receive the uploaded file in $_FILES. Below is the code snippet I have written ...

Awaitable HttpResponseError

My challenge is that I'm attempting to handle a HttpError or HttpErrorResponse using an observable. However, the only option I have is to handle the HttpResponse, which is necessary but not sufficient. I also need to find a way to avoid this limitation. h ...

Dealing with a distinct dynamic identifier in a JSON structure - what's the best approach?

Exploring json handling for the first time using retrofit to interact with an API. The unique ID "f9dcf2ef-8647-46c1-b1cc-7e2bb6c3caa2" varies whenever the username in the URL {username} is changed. { "status": 200, "foundmatch": true, "requested": ...

Sending data in a POST request using Express

I'm currently attempting to send a POST request for a new user to Intercom using the request module, but I'm facing difficulties in getting the format right. Interestingly, I can successfully execute GET requests with request and even post data u ...

Allow AngularJS to make HTTP POST requests with CORS enabled

I am looking to submit a form to send an HTTP POST request to a server located on a different domain, with CORS enabled in the server script using Node.js. Below is the Angular configuration script: var myApp = angular.module('myApp', ['ngRoute']); myAp ...

How to make an AJAX call to httprequest using playframework 1.5.0

When attempting to make an httprequest within an ajax call, I keep encountering an internal error. However, I have confirmed that the http request call is correct outside of the ajax call. What could be causing this issue? Below is the code snippet: http ...

Encountering a ETIMEDOUT error "ip address" when making a Node.js request

What I'm doing in the code I am currently reading a text file containing approximately 3500 links. Subsequently, I iterate through each link to filter out the relevant ones and make requests to retrieve their status codes, links, and page titles usin ...

Error message stating: "Node.js 'readline' - Mark-compacts near heap limit are not effective. Allocation failed."

Here's the process I'm following in the code: Primarily, I am engaging in web scraping tasks. I start by reading a text file containing approximately 3500 links. Next, I iterate through each link, filter out the ones I need, and make a request to retriev ...

Retrieve the data from an HTTP Request using AngularJS

I've been working on creating a JavaScript function that sends an HTTP Request to retrieve data, but I'm struggling with how to handle and use the result in another function. Here are the two functions I've tried (both intended to achieve the same goal): ...

Is it possible to send Page.Request to a Web Service?

Can a Page.Request object be passed to a Web Service? I am in need of a Web Service that can supply data to a browser client. However, I am facing the challenge of needing an object that includes Page.Request in the signature in order to retrieve this dat ...

What is the most efficient way to loop through an array and send each item to a method, ensuring that all methods are executed synchronously?

I need to make a request method call that retrieves its own body as an array, which is one item within another array. To achieve this, I have to iterate over the parent array and pass each of its items to the request method for a new server request. I tr ...

Using Python 3 to extract specific strings from an HTTP request's response

I'm currently facing a challenge with parsing data from an http request response. Can anyone provide some assistance? Below is a snippet of my code: import requests r = requests.get('https://www.example.com', verify=True) keyword = r.text ...

transferring a printing task from Python to Google Cloud Print

The Print Job Dilemma My current challenge involves sending a print job from a python script to a printer that is registered in 'Google Cloud Print'. Required Components for Success A valid google account Registration of Google cloud API, ...

What is the process for sending a POST Request to Ghostbin using Node.JS?

I'm attempting to make a POST request to Ghostbin using Node.JS and the request NPM module. Below is the code I have been utilizing: First Try: reqest.post({ url: "https://ghostbin.com/paste/new", text: "test post" }, function (err, res, body) { ...

Exploring the functionalities of HTTP APIs through Python

As a newcomer to Python programming, I am unfamiliar with all the libraries required for the task at hand. I am interested in using Python to test some HTTP APIs. Specifically, I aim to leverage OAuth and make JSON calls. The relevant APIs can be accessed ...

Upon sending a POST request to http://localhost:5000/getData, a 404 error (Not Found) was encountered while using axios

As a newcomer to react and node.js, I have set up a fake server running on port 5000 with an API (http://localhost:5000/getData) that contains a hardcoded array of objects. My goal is to add a new object to this API from my react frontend running on port 3 ...

Encountering a circular structure during JSON conversion, beginning at an object instantiated with the constructor 'Socket'

Encountering an error while trying to display data from an API. Here is the API link: Click Here. This is the request made to retrieve the data: import Http from "http"; var positions = await Http.get( "http://dev3.dansmultipro.co.id/a ...

Parsing DOM data from an HTTP request in Node.js

Looking to extract data attributes from an SVG element on github.com/profile_name using a node.js HTTP request, and then parsing it into JSON format. <rect class="day" width="10" height="10" x="-36" y="10" fill="#ebedf0" data-count="0" data-date="2017- ...

Node application encountering error callback invocation post request

I am currently working on a node application that functions as a web server. It receives a POST request containing a filename, file path, and the content of the file. The application then creates the file and sends back a response with a 201 message. Belo ...