httprequest

Sending PUT/DELETE data with a XMLHttpRequest

谁说胖子不能爱 提交于 2019-12-06 18:06:28
问题 I used the example from Send POST data using XMLHttpRequest to create this JavaScript code: function PostXML(webURL, post_data) { var objHTTP = new ActiveXObject("MSXML2.XMLHTTP"); objHTTP.open("POST", webURL, false); objHTTP.setRequestHeader("Content-Type", "application/xml; charset=utf-8"); objHTTP.setRequestHeader("Accept", "application/xml; charset=utf-8"); objHTTP.setRequestHeader("Content-Length", post_data.length); objHTTP.send(post_data); while((objHTTP.readyState != 4) && (objHTTP

Angular4: HttpClient - many requests in succession

血红的双手。 提交于 2019-12-06 17:09:13
问题 I have a http get request to get a list of some items from a feed. the feed API requires a page param, which is limited to 20. I would like to get first 60 instead, so I need to make 3 requests requestOptions.params.set('page', 1); this.http.get(environment.api+ '.feed.json', requestOptions) requestOptions.params.set('page', 2); this.http.get(environment.api+ '.feed.json', requestOptions) requestOptions.params.set('page', 3); this.http.get(environment.api+ '.feed.json', requestOptions) what

Using Httprequest to get pictures from given URL

纵饮孤独 提交于 2019-12-06 16:46:26
问题 I'm trying to get pictures from webcams. There is a php-python web service to get the pictures from webcams and serve them: it serves the picture like http://ip/jpeg/camera=1 . private HttpWebRequest request; private HttpWebResponse response; private CookieContainer container; private Uri uri; private string _user; private string _pass; private string _ip; //Login code as seen in the previous section should be here //GetImages is meant to run as a separate thread private void GetImages(string

Replicating HTTP requests with PHP & cURL

有些话、适合烂在心里 提交于 2019-12-06 16:01:07
I am trying to request a password protected page from something called "CM/ECF" (Pacer) to view court dockets and such with PHP/cURL. I am using a FireFox extension called Tamper Data which allows me to see headers and POST data, then trying to replicate that request PHP using cURL. It's not working for some reason, I keep getting a request to log in. I can log in just fine, save the cookie to the cookie jar and get the the "Main" page, but when I do a second curl call (sending the same cookie) to the search page the host redirects me to a login page. Two part question: Part 1 - When I use

Http session synchronization between webview and java http client in Android

我怕爱的太早我们不能终老 提交于 2019-12-06 14:48:39
问题 I am developing hybrid application by using webview and native both. I am using ajax post method in my webview and also using post method via HttpClient on my default android code. But even if i go to same server my session id's doesn't match with each other. Is there any way to make http request within same session in my application? Thanks for any advice. 回答1: I have solved this issue: public void syncSession(final Context ctx){ new Thread(new Runnable(){ public void run(){ //Products will

How to make HTTP REQUEST to mantisBT's REST API using angular Http?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 14:37:56
问题 Background: I installed mantisBT 2.5.0 on a test server, enabled the REST API (which is currently in beta phase). After that I generated an API Key and I have tried to make a test HTTP request using the swagger page on /api/rest/swagger. This works fine. (I could only access this page after renaming the .htaccess to _htaccess) What I want to do: I want to implement a feature in my app to enable sending "easy" bug reports without visiting mantisBT directly. To test the API I implemented this

How could I Encrypt OData Request Payload at Client Side(DataServiceContext) and Decrypting Request at ServerSide?

你离开我真会死。 提交于 2019-12-06 14:31:10
I have an Windows Application consuming OData v4 WebAPI using DataServiceContext . WebApi is over SSL but still I think anyone can trap request using Web Debugging Tools like fiddler (on the Windows Application Host Machine) and can re-issue the request by altering Request Body. So I was just thinking what if I could encrypt RequestBody of outgoing Request in Windows Application using Public/Private Key in Production Environment. If yes how could I? Do I need to create custom DataServiceClientRequestMessage or need to hook encryption process somewhere in DataServiceContext . The Request would

How to display response in next activity

烂漫一生 提交于 2019-12-06 12:14:54
问题 In my application,I am working on searching module my previous question is How to show json response in other activity? for that I send request in server and after that I am getting response and in response I get some data,and that data I want to display in next page,I dont know how to do that,can any one help? class AttemptLogin extends AsyncTask<String, String, String> { boolean failure = false; @Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog

Android - Volley - synchronous and asynchronous http requests

三世轮回 提交于 2019-12-06 11:15:59
I'm programming an application which communicates a http server. I have both synchronized and asynchronized requests. I have a singleton which contains Volley RequestQueue for asynchronous requests. Now I want to implement a queue of synchronous requests like: Request i -> ... -> Response i -> Request i+1 -> ... -> Response i+1 but not: Request i -> Request i+1 -> ... -> Response i -> Response i+1 I have read this topic: Can I do a synchronous request with volley? I want to inject different Listener and ErrorListener (depends on request type). So I added new objects of Listener and

Use IE proxy settings to send HTTP request using vbscript

让人想犯罪 __ 提交于 2019-12-06 10:51:28
I need to write vbscript to send HTTP request to remote server for a machine owned by an organization. Initially, I tried with MSXML2.ServerXMLHTTP but looks like there is some proxy blocking requests made using the script. I can send requests using Internet Explorer just fine, so IE has proxy settings configured. My script looks like this now: Set xHttp = CreateObject("Microsoft.XMLHTTP") 'Set http = CreateObject("MSXML2.XMLHTTP") xHttp.Open "POST", SERVER_URL, data, False xHttp.Send Is there any way to get proxy settings from IE and use it in vbscript somehow? I can't find any reference on