Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [response]

The tag has no usage guidance.

0
votes
1answer
50 views

Magento 2.3 REST API Json response format issue

How I can change the json format from [ [ { "success": [ { "code": 200, "response": { "...
1
vote
0answers
43 views

Ajax call always returns in error from controller Magento 2

From my controller, I return a JSON data to my Ajax call but it always goes in the error section, even when it's not an error. jQuery.ajax({ type: 'POST', url: '/yxcustomer/index/...
2
votes
0answers
37 views

Invalid response line returned from server: HTTP/2 200

When i Tried to enter public and private key Extension Manager it show me error "Invalid response line returned from server: HTTP/2 200 " anyone have this issue ?
2
votes
1answer
23 views

How to make admin grid text to skip to next line?

I have admin grid made by using UI component. One of the columns is comments column. Comments can be long and text is spreading horizontally in one line and that breaks grid layout. I want to achieve ...
1
vote
1answer
34 views

Magento 2: Can I response with a redirect on REST API?

I have an API endpoint that expects a GET request. On some scenarios, I want to be able to perform a redirect instead of responding with a result. e.g., If you'll open the API endpoint URL in a ...
0
votes
1answer
47 views

skip function execution using before plugin

I'm overriding the controller Magento\User\Controller\Adminhtml\User\Validate::execute() using before-plugin so I can perform some checks before magento validate using this function. If certain ...
1
vote
0answers
83 views

How to find custom catalog search in magento2?

We checked the following url in http://localhost/magento2/search/ajax/suggest/?q=tes&_=1545813701256 In this url, how to customize the response from that url. My file path: app/code/Magento/...
6
votes
5answers
3k views

Magento 2: Invalid response line returned from server: HTTP/2 200

Invalid response line returned from server: HTTP/2 200 I get the above error message when I want to log in to the extension manager. Does anyone know how I can solve this? Love to hear if someone ...
0
votes
1answer
61 views

How to get product id in CartItemInterface API response?

When we use this API https://magento.host/index.php/rest/V1/carts/mine/items to get Cart Items its gives response like Array ( [0] => stdClass Object ( [item_id] => 1234 [...
3
votes
2answers
170 views

Magento2 need to throw 500 internal server error in webapi response

Can anyone let me know how to throw 500 internal error in api response with REST API? i have used below right now: throw new NoSuchEntityException( __( 'Field : '.$fields.' required.' )); but it ...
3
votes
1answer
181 views

How to return search API response from controller in magento 2?

I have an API(ukvehicledata) for search using registration id. I want to integrate with magento 2.2 I am getting response in controller as JSON format. I have converted it into an array. Now I ...
2
votes
0answers
200 views

Magento2 - How to return string as object in webapi response?

Can anyone let me know how to return success message with object like this same as magento does for the exception in REST webapi: { "message": "A customer with the same email already exists in an ...
0
votes
1answer
146 views

JSON Response parse error from controller

Magento 1 - I keep getting a parse error. I can't figure out where my syntax is wrong. $this->getResponse()->setHeader('Content-type', 'application/json'); $this->getResponse()->setBody(...
2
votes
0answers
54 views

Custom REST API returns duplicate “response” tag

I am struggling because I get an invalid response from my custom API module for Magento 2 (2.2.5). When I send a request to my endpoint via GET with the header "Accept application/xml" (which is ...
0
votes
1answer
402 views

How to add a parameter to 'request' when redirecting a page?

My code in Rooter.php: $this->_response->setRedirect('customer/account/create'); $request->setDispatched(true); $request->setParam('nickname', $request->getPathInfo()); return $this-&...
0
votes
0answers
15 views

Magento 2.2 : Need the order “Processor Response Code”

We are exporting our orders to csv. Therefore we need the Processor Response Code and processor Response Text to verify, if the payment was done successfully (Code 1000, Text "Approved"). In the ...
0
votes
0answers
355 views

Response of rest api in magento 2.1.12 is too slow

Response of rest API in Magento 2.1.12 is too slow. It take 15 to 20sec for load the data in website. I'm using default mode. Anybody help me to how to increase speed of website?
1
vote
1answer
145 views

How to pass external script inside ajax response?

I am adding social share option on the page using Add This. I have added the code to my phtml file and added the js script in the head, which is working fine. Also, I have an option to filter data ...
1
vote
0answers
20 views

how to solve the magento 2.2.1 checkout page reponse for a long time question?

Recently i develop a new site, it used the magento 2.2.1 vesion. Now i test the site that i found the checkout one-page loading very slow! I don't know the reason? Some people tell me the magento 2.0 ...
0
votes
1answer
314 views

Request Response JSON in magento 2

I have modified form review as popup modal and have overrides the controller in my custom module, the review saved successfully in DB. I need to pass the response to the to JS in JSON format , Help me ...
2
votes
1answer
2k views

Magento 2 - How to return custom json response from API

I'm working with Magento 2 API and I'm really struggled with response of it How can I return some kind of response like this: { "status": 200, "error": false, "message": "Request ...
0
votes
1answer
47 views

Magento2 CSS Rule Overriding

At 300px the page body has 0.3 opacity. For some reason, regardless of the order of these rules in the less file - they are always outputted into the file in the wrong order. Am I being stupid? Is ...
0
votes
0answers
99 views

Magento 2 TTFB is very large for a JSON response from a simple controller

It takes about 1.5s to show the result on Chrome (1.X seconds are TTFB) according to record of Chrome's network tool. My Magento is using redis for caches, and the caches are turned on. How come the ...
3
votes
2answers
2k views

Magento 2 checkout 'shipping-information' response

In checkout page when we click Next button from shipping step, we can see a response named shipping-information that contains payment methods and totals information. Where is this response come and ...
4
votes
3answers
2k views

show error message through plugin Magento2

Hi i have use a plugin feature in my module to check the zipcode is available in the module or not .Which works fine but on validating i have set the error message like <?php namespace Company\...
1
vote
2answers
520 views

Magento 2 Speeding up apache response time

Hi i am customizing a magento theme Porto on my local machine. I am using wamp 2.4.23 on PHP 7. Apache is working very slow and its taking 4-5 mins to load a single page. i have to develop the module ...
2
votes
1answer
2k views

Magento 2 : How to get request and send response in custom REST API?

I have created a custom API i need to know how can i get request and response using this custom API ? I use this link to create custom API : http://inchoo.net/magento/api-magento/magento-2-custom-api/...
2
votes
2answers
12k views

Retreive and return response from controller in magento2

I have a problem in which I'm making an AJAX call to a controller. But, I am not able to check whether it is working or not. I also want to return data in response. But, it keeps throwing some errors. ...
0
votes
1answer
601 views

Is it possible to set an auto reply email for “contact us” form

I'm wondering is it possible to create an auto reply message to emails received through contact-us form?
0
votes
1answer
884 views

how to find Payment Response URL, in Magento account?

We are configuring, a payment gateway from Worldpay to Magento our website. it says, we need to copy the value of Payment Response URL from Magento to Worldpay, Payment Response URL. How can i find ...
7
votes
1answer
5k views

Dynamic create block in magento 2 and send as ajax call response?

I want replacement of following in magento 2.x $block = $this->getLayout()->createBlock('customer/form_login')->setTemplate('persistent/customer/form/login.phtml'); $this->getResponse()-&...
-2
votes
1answer
2k views

How to get JSON data output on backend using API? [closed]

In here I have not experience with JSON on Magento. So I need to know useful links or tips to learn that.
2
votes
2answers
3k views

Triggering a 404, 500, 503 error in Magento 2

Is there a standard way in Magento 2 to programmatically trigger an HTTP error state and have the system just deal with it? i.e. is there a standard exception we can throw or global method we can ...
4
votes
3answers
10k views

Magento 2: Sending a Custom Header/Response from a Controller

In Magento 2 is it possible, from a controller execute method, to manipulate the request to send a custom header and error page. In Context: We're implementing a small, limited REST API endpoint ...
4
votes
2answers
1k views

Error parsing headers: duplicate header 'Content-Type' from DashboardController tunnelAction

I'm getting an apache error saying that I have duplicate headers for 'Content-Type'. I see that the tunnelAction function correctly adds the header Content-Type:image/png, but instead of passing in ...