74 questions
1
vote
0
answers
52
views
How to log Headers or Cookies added to outgoing http-request by SocketsHttpHandler
I have a typed HttpClient, added to DI like this:
builder.Services
.AddHttpClient<IExternalApiClient, ExternalApiClient>()
.ConfigurePrimaryHttpMessageHandler(() => ...
0
votes
2
answers
101
views
How do you access the custom HttpMessageHandlers assigned to an HttpClient?
I'm building an HttpClient adapter for a connection to E*Trade. This HttpClient requires a custom message handler that needs to know things about the connection for OAuth. Things like the access token,...
0
votes
1
answer
93
views
HttpClient w/HttpMessageHandler data concurrency issue
I have a microservice that integrates with a third-party service via API calls. To handle the integration, I've created a typed HttpClient with a HttpMessageHandler registered as a transient service ...
1
vote
1
answer
1k
views
window.webkit.messageHandlers is defined in an iOS Chrome & Firefox browser which is not in a Webview
I was under the assumption that webkit.messageHandlers are defined on iOS in a webview context. But when I do an alert of this, I get some kind of "value" that I cannot look into.
Can I get ...
0
votes
1
answer
162
views
Coverity - MessageHandler/HttpClient leak issue
Coverity sees in the following code that the messageHandler going out of scope, leaks the resource it refers to.
"System.Net.Http" Version="4.3.4"
.net 6.0
Could you please ...
0
votes
1
answer
790
views
(Symfony project) Doctrine error: A new entity was found through the relationship. Ecountered when running messageBus async (sync works fine)
I know many people asked this type of question but I believe mine is different because I only encouter the error when trying to run the message async.
This is just a project for personal use to try to ...
-1
votes
1
answer
423
views
add custom httpMessageHandler to service registration in .net core
I have this registration class as you can see :
public static class InternalSymbolServiceRegister
{
public const string DefaultConfigSectionName = "myService";
public static ...
1
vote
2
answers
202
views
HttpMessagehandler in a weatherforecast
I am trying to implement the HttpMessageHandler in the weather forecast example for ASP.NET Core Web API.
Basically I want a HttpMessageHandler class to intercept the HttpRequest before it hits the ...
0
votes
0
answers
344
views
bot not responding to specific message using python-telegram bot
The issue is when I want to call the '/cancel' command to my bot is it doesn't respond.I tried logging the messages sent and received to see what is going wrong.it seems like the messages aren't being ...
1
vote
1
answer
52
views
Window Message Handling functions somehow change Value of int variable which should remain untouched
In my Window_manager.c file I nowhere edit the Value of *wm->actStkSize by hand (!?), however after calling DispatchMessage(&msg); in the RunMessageLoop function, the Value somehow changed from ...
1
vote
2
answers
916
views
I can't make second msg handler after keyboard button in telegram bot on python telebot
@bot.message_handler(content_types=['text'])
def get_text_messages(message):
if message.text == "/start":
begin = types.InlineKeyboardMarkup()
namebutton = types....
0
votes
1
answer
1k
views
Is there any way to send an alert message (callback.answer(text, show_alert=True) without getting a callback data from an inline button?
I know that the alert-message can only be received if the user clicks on the inline button and sends the callback data to the bot. But I want an alarm message to be sent if, say, I wrote the wrong ...
1
vote
0
answers
998
views
"message not found" error in aiogram when i try to edit the message
`I have a telegram bot that, when pressing the inline "select" button, changes the reply markup of this message (removes the "select" button so that the user does not spam it) and ...
0
votes
2
answers
3k
views
How to use message handlers in .NET 6?
I need to add a custom header to each http request. To do so, I want to use a message handler and override SendAsync() method like so:
public class RequestHandler : DelegatingHandler
{
...
-1
votes
1
answer
222
views
Checking for messages in windowless application
I have a small application that needs to react to a particular device being added or removed from the system. So I listen for WM_DEVICECHANGE using CreateWindowEx() and RegisterDeviceNotification().
...
1
vote
0
answers
386
views
How to parse form content in DelegatingHandler
I'm trying to create a custom message handler which adds an Authorization header to all requests sent by an HttpClient. In order to compute the value of this header, the path of the request (including ...
2
votes
2
answers
1k
views
pyTelegramBotAPI message handlers can't see photo
I need my telegram bot to forward messages from the private chat to the customer care staff group.
I run this code:
@bot.message_handler(func=lambda message: message.chat.type=='private')
def ...
1
vote
1
answer
2k
views
Telegram bot to recognize URLs
I'm creating my first Telegram bot. I want the bot to filter text looking only for URLs, and trigger when is found.
For example, if someone types in the chat "www.google.com", I want the bot ...
0
votes
1
answer
731
views
Error: requestHandler has not been initialized
This project is a recycler view fragment that gets images from flickr and display it.
I used loopers and handlers to communicate between the recycler fragment and the downloading thumbnail fragment... ...
0
votes
1
answer
222
views
If two integrationflows are passed to one general MessageHandler class, is it thread safe? in Spring Integration DSL
I have two IntegrationFlows
both receive messages from Apache Kafka
first IntegrationFlow - in the input channel, Consumer1(concurrency=4) reads topic_1
second IntegrationFlow - in the input channel, ...
1
vote
1
answer
4k
views
Asynchronous function in telegram bot
From understanding basics of async/await I learned that time.sleep() is a blocking function, which freezes the execution. I tried to check it in this simple message_handler while creating a telegram ...
0
votes
1
answer
591
views
How to write files dynamically into subdirectory by FileWritingMessageHandler
I have to write files into multiple subdirectories based on a header attribute.
Not getting a way to configure it in Spring Integration.
@Bean
@ServiceActivator(inputChannel = "processingChannel&...
0
votes
0
answers
279
views
CallbackContext error is keep shown on cmd after my seesion starts polling and send a message on telegram
import logging
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO)
...
1
vote
1
answer
4k
views
Limit Access to a Telegram Bot
I've written a telegram bot using aiogram. I want to restrict it so certain users can access it. I've read this question, which has answers for different telegram bot libraries. But for the aiogram, ...
1
vote
1
answer
94
views
window message management in MFC : Is the addition of the base class call mandatory?
Let's consider this code fragment :
BEGIN_MESSAGE_MAP(CMyCheckBox, CButton)
ON_WM_MOUSEMOVE()
END_MESSAGE_MAP()
void CMyCheckBox::OnMouseMove(UINT nFlags, CPoint point)
{
// here my code .......
0
votes
1
answer
108
views
Twig render in service not finding CSS if called by background process in Symfony 4
I have a service method that I call by a MessageHandler and by a Controller Action:
class ReceiptService
{
public function myMethod()
{
// ...
$html = $this->twig->...
1
vote
1
answer
1k
views
PostQuitMessage(0) won't terminate my 'program'
I'm just trying to learn a little bit of C++ and wrote a few lines that do nothing but open a window.
I've added a Message Handler too and by clicking the [X] on my window it closes as its supposed to....
0
votes
1
answer
703
views
ASP.NET 4.5 Web API 2.0, JWT Message Handler Returns Status 0 to Angular 7 HTTP Interceptors
Thanks in advance.
Actually, I wan to implement JWT refresh token in Angular 7 Application using HTTP Interceptor. I've implemented JWT using HTTP Message Handler (DelegatingHandler). On Unauthorized ...
0
votes
2
answers
2k
views
How to use the qmhrcvpm api
I need to retrieve all messages in a pgmq.
I tried to use *FIRST as a parameter, but api does not return anything.
qmhrcvpm(rcvm0200:%size(rcvm0200):'RCVM0200':'*':0:
'*FIRST':*...
1
vote
1
answer
2k
views
An example for Spring Integration with spring-integration-jpa
I see many examples related to spring-integration-file. But I am looking for an example application where it uses spring-integration-jpa to pull data from database using Inbound Channel Adapter and ...
0
votes
1
answer
232
views
Creating multiple files after receiving a queue message
I have a project that reads from mongodb and sends that information to the queue. my listener picks up the queue message from cloud. I am able to create a .txt file that inputs all the information ...
2
votes
1
answer
9k
views
Telegram bot message_handler with lambda
I´m trying to use the @bot.message_handler with lambda to capture some words in the messages sending in a group with my bot. I see a lot of examples and everybody use a code similar to this:
import ...
0
votes
0
answers
26
views
how can i configure a message handler based on the environment in webapiconfig.cs file?
I am using Aspnet webapi2. I want to register a message handler based on the environment. can you please let me know how can i configure the same based on environment.
public static class ...
1
vote
1
answer
2k
views
Unit testing Custom MessageHandler
I have a custom handler as below:
public class LoggingHandler : DelegatingHandler
{
public LoggingHandler()
{
}
protected override async Task<HttpResponseMessage> ...
2
votes
0
answers
2k
views
Spring MappingJackson2HttpMessageConverter not getting triggered?
I have a fairly old Java 8 / Spring app which provides a REST API. The response is sent in either JSON or XML depending on the Accept Header.
So for example
application/json-v1 converts the ...
0
votes
0
answers
326
views
c# HttpClient MessageHandler random forbidden
I have a program which does API call using HttpClient and overriding DelegatingHandler class to retry request on failure as shown below.
class TestHandler
{
public static void APICallTest()
{...
0
votes
1
answer
772
views
Handler should not directly implement the javax.xml.ws.handler.Handler interface
Before this, I am using SOAPHandler< SOAPMessageContext > to handle the data from webservice. The code as follow:
public class MyBillSoapMessageHandler implements
SOAPHandler< ...
1
vote
1
answer
973
views
System.Format Exception throw by SendAsync method of Delegate handler
While using a custom message handler, I keep encountering the following error on the API server side:
API Controller:-
[RoutePrefix("errors")]
public class ErrorController : ApiController
{
[...
0
votes
0
answers
691
views
applying messagehandler to specific webapi controller
I have requirement to specify MessageHandler in webapi.config file for specific controllers only.
So, I have code in webapiconfig.cs file as follows.
public static class WebApiConfig
{
public ...
2
votes
1
answer
347
views
NServiceBus Deserialization Exception After Deployment
I am currently using NServiceBus6. I am successfully submitting a message from my web api to endpoint which is windows service hosted. Everything works fine in my development environment on my local ...
1
vote
2
answers
1k
views
Route-specific ASP.NET MVC Web API message handler not invoking controller action
I've got an ASP.NET MVC Web API controller:
[HttpPost]
public async Task<HttpResponseMessage> Post(HttpRequestMessage req, CancellationToken cancellationToken) {...}
And a custom message ...
1
vote
1
answer
542
views
Use rebus TransactionContext within a message handler
I am trying to use the Rebus transaction context within my message handler.
I have read the documentation here and have seen the sample here, however I do not know how Windsor works.
Could somebody ...
0
votes
2
answers
3k
views
Unable to get headers from jQuery AJAX request in ASP.NET Web API
I have an ASP.NET Web API which is hosted on Azure. I have integrated HTTP Message handler to that API. The message handler is getting hit when I am hitting it using AJAX call. I am also sending some ...
8
votes
2
answers
3k
views
How to add MessageHandler for a specific controller that is using Routing Attributes in ASP.NET WebAPI 2?
It is possible to add a MessageHandler only for a specific controller that is using Route Attributes?
I want to cut the request earlier in the pipeline if it doesn't contain certain headers. I want ...
1
vote
1
answer
350
views
What's the best way to communicate with a Service in every activity of my app without replicating the same code?
I implemented a Service and I use a Messenger with its handler as a communication bridge.
Every time that I start an activity I have to follow these steps:
1) create the service connection
private ...
1
vote
1
answer
750
views
Custom message handler with attribute based routing is not working for Web API 2
I have a Message Handler in my Web API 2 project which change the url to a different path. Such as url "root/controller/somevalue/detials" will be changed to "root/controller/2/details". Where "...
1
vote
1
answer
1k
views
Spring Integration several messageHandlers
I am new to the Spring Integration and I couldn't find any similar post here.
Right now I have one messageHandler which calls specific URI and writes to the channel.
@Bean
@Scope("prototype")
...
1
vote
1
answer
1k
views
Get response data from SendAsync method ASP.net web API Message Handlers
I want to fetch returned data from Web api and save in my database.
My Message handler code is here:
protected override async Task<HttpResponseMessage> SendAsync(
HttpRequestMessage ...
0
votes
1
answer
2k
views
Java Websocket / MessageHandler return to global scope?
I'm facing the following problem and I found no working solution yet.
I have 3 different applications that should communicate with each other:
the UI part (1)
the backend application (2)
the ...
0
votes
1
answer
380
views
Web API modify incoming payload in formatter
All,
I am trying to modify the payload of incoming object via the web API. Currently I'm using a custom formatter which inherits from JsonMediaTypeFormatter and overrides the relevant methods.
Looks ...