Questions tagged as 'http-request'

1
answer

How to use "request unique" in the following situation

I have two methods in the Controller that have the function of saving a new check and another one that updates the check with the edit. The two methods pass through the Request before entering into the bank, but the Request validates if the c...
asked by 15.10.2018 / 18:06
1
answer

My client can not find my HttpServer?

This is my client's code: public static void main(String[] args) throws IOException, InterruptedException { SendData sender = new SendData(); String JsonDeDados; String infos = "informacoes"; Ht...
asked by 11.06.2018 / 22:37
1
answer

How do I get parameters from a PUT request?

I'm starting to study Web Service and created an example of an API in REST. I'm passing parameters via PUT to the API and catching with parse_str in PHP but what returns to me is something completely different ... How do I get the para...
asked by 09.11.2016 / 13:52
1
answer

Is it possible to handle http request header?

If you are dealing with a request http , is it possible to manipulate the request header? Or is it only possible to do such manipulation in response ? If possible, what languages are in it? Is there an example that might eluci...
asked by 04.01.2016 / 18:05
1
answer

Junit with spring Autowired

I have a big problem that in my GenericService I use an @Autowired in an HttpServletRequest (Even though I do not know the utility, therefore, I do not know the architecture so well), and I needed to use unit test for test battery in my services...
asked by 26.08.2014 / 14:02
1
answer

Android: InputStream

Is there a way I can change: InputStream is = getAssets().open("xxx.html"); To: InputStream is = ("http://www.xxx.com.br/xxx.html"); Maybe using HttpURLConnection but I do not know how to implement it. Here's a piece of my code wher...
asked by 31.07.2014 / 17:10
1
answer

IDHTTP with Delphi - HTTP request failed 401 HTTP / 1.1 401 Unauthorized

Good afternoon. I have an example PUT request code in PHP: $params["access_token"] = "### Chave de Acesso ###"; $data["Product"]["stock"] = 100; $url = "https://{api_address}/products/123?".http_build_query($params); ob_start(); $ch = curl_...
asked by 09.11.2018 / 19:01
0
answers

Ajax Request with header Authorization

I'm trying to make an ajax request but it needs a BASIC authentication, follow my code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>$(function(){$.post({url:link,contentType...
asked by 03.08.2018 / 16:03
2
answers

How to listen to a request in Angular 4

I'm doing an Http request in Angular 4, but I need to listen to it and show it in the template in real time, that is to say the extent to which it is being registered, the information will appear on the grid automatically. ngOnInit() { thi...
asked by 07.12.2017 / 15:15
0
answers

Error HttpWebRequest C #

I am making a request in a URL and trying to get the answer, I get the following error:    The underlying connection was closed: Unexpected error in a submission. The point is that this statement worked normally. Below the code: var...
asked by 23.06.2017 / 15:51