httprequest

git push makes me login to github. fatal: HttpRequestException encountered

混江龙づ霸主 提交于 2019-12-10 13:37:22
问题 Every time I push my changes, no matter what branch I am on, it prompts for username. Once I type in my username an alert pops up prompting me to input my password. Once I do it, then changes are pushed. This just started happening and is annoying to type in my login info each time I push changes. Any suggestions? $ git push fatal: HttpRequestException encountered. An error occurred while sending the request. Username for 'https://github.com': jhower 回答1: jhower, Update to the latest git and

RemoteMessage.GetNotification() returns null when request is not from Firebase Console?

醉酒当歌 提交于 2019-12-10 13:12:56
问题 I am testing Firebase Cloud Messaging. If I use a Firebase Console to send a message - in my code I Notification object with values set - not a problem: public override void OnMessageReceived(RemoteMessage message) { base.OnMessageReceived(message); Firebase.Messaging.RemoteMessage.Notification oNotification; oNotification = message.GetNotification(); I am using http://requestmaker.com/ to send a notification - and all works fine - it gets sent and I get back the messageID. POST /fcm/send

Sending “request payload” with libcurl?

十年热恋 提交于 2019-12-10 12:30:17
问题 I am using libcurl. I know how to send form data. I want, however, to send a "request payload" , but I have no idea how to. This is what an example of what I am trying to do, in Chrome Developer Tools: View image Can anyone please help me? 回答1: The command-line version of what you want would be something akin to: curl --header "Content-Type: application/json" --data '{"data":"blob"}' http://address.com (you'll probably want to include cookie information for authentication too) I don't know

Struts2 handle session timeout using Interceptor

妖精的绣舞 提交于 2019-12-10 11:46:14
问题 I am trying to handle session timeout requests in my struts2 application using an Interceptor. Below are the files related to this: Web.xml: <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <session-config> <session-timeout>1</session-timeout> </session-config> Struts.xml: <package name="default" extends="struts-default"> <interceptors> <interceptor name="sessionInterceptor" class="com.platform.web.security.SessionInterceptor" /> <

Use IE proxy settings to send HTTP request using vbscript

萝らか妹 提交于 2019-12-10 10:47:32
问题 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

New Line definition for HTTP/1.1 headers

隐身守侯 提交于 2019-12-10 10:41:18
问题 I have an embedded system that makes a HTTP POST request, however I know that the headers must have a format. In this case I have this request: POST / HTTP/1.1\n Host: 192.168.1.15\n Connection: close\n Content-Length: 44\n Content-Type: application/json\n \n {\n "command": "snapPicture",\n "selfTimer": 0\n } I want to avoid any kind of error while I send this request. Strictly talking, is it correct use \n to tell new line or should be \r\n ? Any suggestion about this request format? Thanks

Error message from DotNetOpenAuth's ReadAuthorizationRequest when passing in HttpRequestWrapper

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 09:54:46
问题 I have a custom authorization filter for my Authorize method in my OAuth controller. When the authorization filter notes the user is logged, it stuffs the current OAuth request into the session, and ships them off to log in. After log in, in my /OAuth/Authorize endpoint, I check to see if that request is in the session, instead of immediately failing because there is not an authorization request attached to the current request. Then, I call the authorization server with that request object.

How read data sent by Client with Spark?

谁说我不能喝 提交于 2019-12-10 07:30:56
问题 I have to read some data sent by Client using Spark (a framework for Java). This is the code of client's post request. I am using jQuery. $.post("/insertElement", {item:item.value, value: value.value, dimension: dimension.value }); The code of server: post(new Route("/insertElement") { @Override public Object handle(Request request, Response response) { String item = (String) request.attribute("item"); String value = (String) request.attribute("value"); String dimension = (String) request

How to emulate a real http request via cfhttp?

故事扮演 提交于 2019-12-10 04:26:44
问题 I need to emulate a real http request via cfhttp. I was getting rss feed with ColdFusion, but tonight they started to block my request and send an index page in response instead of rss fead. I added useragent for cfhttp, but it doesn't help. Opera, Firefox and Chrome open feed correctly from the same computer. 回答1: Yep, thanks. I sniffed all HTTP headers which browser sends to the site and then emulated them in cfhttp request. The solution is: <cfhttp url="http://example.com/feed" useragent=

How to get request parameters from view scoped JSF bean?

落花浮王杯 提交于 2019-12-10 04:01:52
问题 I have the view scoped bean which should access on init (@PostConstruct) the values from request URL and store them within its lifetime. I've learned, that in order to get the values from http request , I need the following code: @ManagedProperty("#{param.x}") private int x; Which gives me the value of attribute X. However, I can do that trick only in request scoped bean. Injecting this bean via @ManagedProperty to my bean also will not work. So, how to get access to that bean in view scoped