I am using GSM module (M95 Quectel). As per given example of Send HTTP GET Request in Quectel http command manual, I am sending the command but in the end I failed to get a response from the server side. Its show the following error when sending:
send AT+QHTTPGET
+CME ERROR 3827
How can I get the correct response and read the data?
The QHTTPGET command should be sent with the to_read_time variable. for example:
AT+QHTTPGET=60 please check if this is what you are doing.
In addition, you can check the URL you are trying to perform the GET request to in chrome, by entering it and view the response to check server validity.
Also, you can try checking if you mannage to perform a GET request to a test server such as in here:
HTTP Test server that accepts GET/Post calls
Related
I use lua script to generate data from the parameters and bodies, and then send the data to the other server.
When i handle a GET request, nginx returns a normal response.
However, a 404 not found error occurs when handling POST requests.
However, internal operations were normal and sent the data to the other server.
Only the request method has changed.
If i explicitly pass the value to ngx.say or ngx.exit, i get 200 response normally.
Why? Is it necessary to explicitly return a response code when using a post request with a lua script?
In addition, I am using empty_gif.
I have searched for the above problem.
empty_gif can only be used to respond to GET and HEAD request methods
so I will use 204 response code
I am trying to connect my bot to an azure function with a db. I entered the azure function URL as the webhook, it recieves the request as a POST http message.
I tried to respond with the following test message (and many more simpler ones):
{
"fulfillmentText":"fulfillmentText",
"fulfillmentMessages": [{"simpleResponse":{"textToSpeech":"text","ssml":"ssml","displayText":"text"}}]
}
and got a response:
Webhook call failed. Error: Failed to parse webhook JSON response:
Expect message object but got:
"笀∀昀甀氀昀椀氀氀洀攀渀琀吀攀砀琀∀㨀∀昀甀氀昀椀氀氀洀攀渀琀吀攀砀琀∀Ⰰ∀昀甀氀昀椀氀氀洀攀渀琀䴀攀猀猀愀最攀猀∀㨀嬀笀∀猀椀洀瀀氀攀刀攀猀瀀漀渀猀攀∀㨀笀∀琀攀砀琀吀漀匀瀀攀攀挀栀∀㨀∀琀攀砀琀∀Ⰰ∀猀猀洀氀∀㨀∀猀猀洀氀∀Ⰰ∀搀椀猀瀀氀愀礀吀攀砀琀∀㨀∀琀攀砀琀∀紀紀崀紀".
Everytime I enter a query in dialogflow I can check the diagnostic info and I see the response clearly in the "Fufillment Response" tab but then there's the above error in the "Response Status" tab.
Help would me much appreciated.
It looks like the content type of the HTTP response may be unclear. Make sure the HTTP response sets the content-type header explicitly to "application/json" or possibly event "application/json; charset=utf-8".
The problem has something to do with the Azure functions URL. For me a workaround was to write the function in visual studio, deploy to localhost, and use ngrok as a tunnel for dialogflow to call the webhook, rather than using the Azure Functions URL.
I would like this exception to be caused:
// ErrBodyNotAllowed is returned by ResponseWriter.Write calls
// when the HTTP method or response code does not permit a
// body.
ErrBodyNotAllowed = errors.New("http: request method or response status code does not allow body")
When I send HEAD request with body using fiddler I get 400/504 error codes, but I don't see any error log in my application.
I assume you're talking about a go server that you control. You should see this error returned when you call writer.Write() on a HEAD request. You need to handle it in your application by checking for that error. Find where you are calling Write, and check for the error, then display it to the user. You probably need to replace:
writer.Write(data)
with something like:
_,err := writer.Write(data)
The flow is SAP NWAS 7/Java AS ---> Apigee On Premise--->Apigee OnCloud -----> Backend. and back.
Backend is posting a response of appx 17 MB back. I have streaming enabled both on cloud and on premise Apigee. But the sap NWAS client states that only partial response is received .
When we invoke from POSTMAN however, we are getting complete response.
Please suggest where the problem can be?
Since Postman works fine for you, it seems like it might be a problem on the client side. So, it's possible that the client requires more info on the response in order to be able to display the content e.g. Content-Type header. Another way to troubleshoot this issue is to send a cURL command to the resource in Apigee and store it in the filesystem to validate that not only Postman can parse the response. e.g.
curl http://yourresourcehere/images/12344 > img12344.png
I am using webMethods from the SAG and it seems if the service
pub.client.http
throws an exception on status code 401 "Unauthorized".
This leads me to the problem that I cannot handle the status code because nothing is written to the pipeline.
getLastError
does contain the string "Unauthorized" but not the status code.
Except that I do not want to start parsing exception messages...
Any ideas?
The output parameter header from the pub.client.http call should contain the information you’re after:
header Document Conditional. HTTP response headers.
Key Description
lines Document Fields in the response header, where key names represent
field names and values represent field values.
status String HTTP status code of the response.
statusMessage String HTTP status message of the response.
See the webMethods Integration Server Built-In Services Reference page 122 for more details.
Asked a SAG senior consultant.
This is the normal behavior.
There is no flag which you can set to enforce suppression of this exception...
You can suppress the exception and have the HTTP 401 status returned like any other HTTP response. Go to the IS Admin Extended Settings and set:
watt.net.http401.throwException=false
Note this is a server-wide setting, so it will affect all your applications/services that use pub.client:http.
According the comment from #Hugo Ferreira probably there are ACL restriction whether inside your webMethods environment, or your client URLs.
Things you should consider:
Do your webMethods server located inside closed environment wherein need to get connected to proxy to get to the outgoing request. Which is likely you can investigate by run web-browser program directly from your wM server towards the URL address (i.e using SSH to run firefox in my case and popup appeared)
The client that your request will go to, have HTTP for authentication requests
Solution
To pass this all you need to do is input the auth user/password or any other auth mechanism i.e kerberos, token, etc. inside the pub.client:http