Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

246
Visualizações
How to add URL as a parameter in Asp.net

I am in a situation where I need to pass URL as a parameter from javascript to Controller. But when I pass URL as a parameter I get error

async sendSmsNotification() {
var url = new URL(`https://chats.landbot.io`);
var PlanId = "123";
await NotificationService.sendNotification(PlanId, url);
}

export async function sendNotification(PlanId: string, url: string) {
    let url = HttpClient.buildUrl(`api/sendNotification/${PlanId}/${url}`);
    return await HttpClient.get(url);
}

Below is the actionmethod where I am expecting url link

        [HttpGet("Notification/{PlanId}/{url}")]
        [ValidateModelState]
        public async Task<IActionResult> SendNotification(Guid PlanId, string url)
        {
            var Plan = await _PlanRepository.GetPlan(PlanId, SecurityToken);

            try
            {
                return NoContent();
            }
            catch (ArgumentException ex)
            {
                return BadRequest(ex.Message);
            }
        }

I am getting this error

httpClient.ts:98 GET https://localhost:44386/api/Notification/c2776efe-49aa-46ff-a7f8 404

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda