Posts by Dasx • 131 points
12 posts
-
0
votes0
answers19
viewsQ: How do I receive route parameters in a controller in Typescript?
I have the simple routes.ts: import { Router } from 'express' import UserController from './controllers/UserController'; const routes = Router(); routes.get('/:User', UserController.index); export…
-
0
votes0
answers19
viewsQ: Return Rows through IPC in Electronjs
Save my friends. I’m studying a little bit about Electron, and I came across the following problem in interprocessual communication. I have an index.html (rendered process) that emits an event pro…
-
2
votes1
answer32
viewsQ: Return the elements of a randomized list
I have an array generated by a string.split(), and the value of this string is obtained by a input. That is to say: string = input("Digite os Nomes separados por Vírgula") arrTeste =…
-
0
votes1
answer21
viewsQ: Skipar an optional argument among several in Python
In the following code: def FuncEx(hashTag, lang="pt-br", pages=3): sel.get(f"A hashtag {hashTag}, na linguagem {lang}, no total de {pages} páginas.") How could I do if I wanted to pass only the…
-
-1
votes1
answer60
viewsQ: Error Importing Golang Package
I’m trying to call a function from another package on main but when I import and try to use the exported function returns the error of "package functions imported but not used". Function.go…
-
0
votes1
answer36
viewsQ: Doubt Function / Callback Golang
Do I necessarily need to deal with Sponse for the function to be executed? As it stands it says that the variable "tweet" was declared but not used, but as it is a POST request, I see no point in…
-
1
votes2
answers84
views -
-1
votes1
answer89
views -
0
votes4
answers184
viewsA: How to set a GET request header in Golang
As the two answers helped me, I leave here the solution to my problem, in case someone is looking for the same, First of all, I was using the wrong HTTP method because GET doesn’t have settable…
-
0
votes4
answers184
viewsA: How to set a GET request header in Golang
Well, I am making the same request with Nodejs + Node-fetch and is returning 200 with the API data, using the following code: const headers = { method: 'get', headers: { Authorization: `Token…
-
2
votes4
answers184
viewsQ: How to set a GET request header in Golang
I’m trying to make Golang my first mid-high level language, but I’m having some problems. I can’t set a header for an external GET request at all, I searched the documentation, forums and the only…
-
2
votes1
answer182
viewsQ: How to simulate an input or store a future response
I’m making a Telegram chatbot via Python, through some lessons I’m doing, and in the middle of the process I came across a problem: I can’t in any way store the customer’s response in a variable.…