I am using Jetty's ContentExchange to send async http requests. I figured out how to send simple requests by just setting url. But for SOAP request, I am not sure how to set up the ContentExchange object. I searched but did not find any useful info. Please let me know if you have such experience or have some sample code to share. Thanks!
Related
I need to create some kind of health check in Splunk that calls a Rest URL every hour and check if the response returns HTTP code 200 and send an alert in case there is an error like http code 400 or http code 500.
For example Splunk should make an http call to the URL of my application every hour and check if the URL of my application returns HTTP code 200. In case the response from the URL has a different code than 200 then send a notification email telling that something is wrong.
is that possible?
Please help.
Check out the REST API Modular Input app at https://splunkbase.splunk.com/app/1546/.
You can also create a Python program that checks the URL and reports on its health. Schedule that program as a scripted input.
You can use the website monitoring app for Splunk, https://splunkbase.splunk.com/app/1493/ to get the return codes for your endpoints
I came across a challenge that can't seem to find a way to handle. I have a software that runs a camera system. This software is only capable of sending a POST requests. It allows me to type in the host IP, user name, password and a body of a request. I wanted to send an http request to close/open an output on one of the cameras, but from the camera manufacturer API documentation the only way to close an output via http request is to send a request with PUT method. Is there a way to change a method of a request from the body of the request, or from the host IP field? Or maybe there is a standalone software that could act as a proxy to convert that request? Finally if there's no solution out of the box does anybody know if I could set up a lightweight server with which I could accept the POST request, analyze it and send it as a PUT request?
Really appreciate your input.
Thank you.
Well if you ask, there surely is burpsuite which can be used to manipulate your http request packet. Just add the port to proxy option and turn the interceptor on so before the request reaches to api you can manipulate the http packet.
Hope this is what you were looking for.
How can i read the body of a POST request sent via REST client (something like postman)? I think that it can be done also via wireshark, but honestly i don't know if there is some specific filter for this.
Thanks all
i am making an app in which there is a need of money transaction...
for this i have to send SOAP xml to server but in secure way....
i have been told that i have to create SSL connection first and then send that soap message.....
I know about SOAP very well but no idea about SSL connection...
please provide some help...
Check out NSURLConnection docs on the apple site: NSURLConnection
EDIT: added more info.
You need to set up authentication. A quick search of SO produced these results:
NSURLConnection SSL HTTP Basic Auth and
HTTPS with NSURLConnection - NSURLErrorServerCertificateUntrusted
You need to set up your server to handle authentication, then issue a challenge to the device. As you can see in the above posts, there is a function: didReceiveAuthenticationChallenge:
You need to use this to handle authentication challenges. You can get a good idea of how to go about it using the above posts.
Your server needs to be set up to handle authentication, as well. I don't know what language you use with your server, but as I use PHP, here is the PHP manual link on authentication:
PHP authentication
It is a tricky thing to do at first, but once you get into it isn't bad (and creating more https connections comes easily). However, writing out everything you would need to do here is a bit much. If you scope out those posts, you can get a general idea about how to go about it. It'll take some working to get it done.
Most often this simply means that you have to send data to an HTTPS endpoint. What this also means is that there is a secure connection (done for you automatically) between the client and the server so that the payload (body) of the message is encrypted rather than transmitted in clear text (which is the case with HTTP).
Basically, most times, it is enough just to make sure you're using HTTPS :)
Have a look at http://en.wikipedia.org/wiki/Secure_Sockets_Layer
I need to test a client app on IPhone which connect to a WebServices.
This connection time out is check once/day at 6am.
So, we can only test "time-out" case only once/day.
I want to test more time/day. But I can not change on Web Service because of no authentication.
There a solution to use a proxy server to catch package, change session ID and send to test server. But I don't know how to do it?
Can anyone help me?
Any other solution?
Thanks in advance
For the proxy solution you suggest, I recommend Charles. In Charles you can rewrite both the request and the response from the server.
The Rewrite tool enables you to create rules that modify requests and responses as they pass through Charles. Rules such as adding or changing a header or search and replace some text in the response body.