WCF + REST: Where is the request data?

This unfortunately isn’t supported- we had a similar need, and did it by calling internal members with reflection. We just use it in an error handler (so we can dump the raw request), but it works OK. I wouldn’t recommend it for a system you don’t own and operate though (eg, don’t ship this code … Read more

Node.js promise request return

A promise is an object that serves as a placeholder for a future value. Your parse() function returns that promise object. You get the future value in that promise by attaching a .then() handler to the promise like this: function parse(){ return new Promise(function(resolve, reject){ request(‘https://bitskins.com/api/v1/get_account_balance/?api_key=’+api+’&code=”+code, function (error, response, body) { // in addition to … Read more

Make a HTTPS request through PHP and get response

this might work, give it a shot. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); // Set so curl_exec returns the result instead of outputting it. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Get the response and close the channel. $response = curl_exec($ch); curl_close($ch); for more info, check http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

HTTP GET Request, ASP – I’m lost!

Your code should look like this:- Function GetTextFromUrl(url) Dim oXMLHTTP Dim strStatusTest Set oXMLHTTP = CreateObject(“MSXML2.ServerXMLHTTP.3.0”) oXMLHTTP.Open “GET”, url, False oXMLHTTP.Send If oXMLHTTP.Status = 200 Then GetTextFromUrl = oXMLHTTP.responseText End If End Function Dim sResult : sResult = GetTextFromUrl(“http://www.certigo.com/demo/request.asp”) Note use ServerXMLHTTP from within ASP, the XMLHTTP component is designed for client side usage and … Read more

How i can set User Agent in Cordova App

It depends on which version of cordova-android and cordova-ios you are using. You can check the platform cordova versions by running cordova platform list If you are using 4.0 and above versions for both iOS and Android you can set them in config.xml as stated in cordova documentation here <preference name=”OverrideUserAgent” value=”Mozilla/5.0 My Browser” /> … Read more

Module request how to properly retrieve accented characters? � � �

Since binary is deprecated it seems like a better idea to use iconv and correctly handle the decoding: var request = require(“request”), iconv = require(‘iconv-lite’); var requestOptions = { encoding: null, method: “GET”, uri: “http://something.com”}; request(requestOptions, function(error, response, body) { var utf8String = iconv.decode(new Buffer(body), “ISO-8859-1”); console.log(utf8String); }); The important part is to set the … Read more

Intercept POST requests in a WebView

I was facing the same issue a few days ago. So I built a library that solves it: https://github.com/KonstantinSchubert/request_data_webviewclient It is a WebViewClient with a custom WebResourceRequest that contains the POST/PUT/… payload of XMLHttpRequest requests. It only works for these though – not for forms and other kind of request sources. The hack works, basically, … Read more