Skip to content

Instantly share code, notes, and snippets.

View allanShady's full-sized avatar
🏠
Working from home

Allan Camilo allanShady

🏠
Working from home
View GitHub Profile
@Elfocrash
Elfocrash / IntegrationTest.cs
Created July 10, 2019 10:40
ASP.NET Core Integration tests code from my video: https://www.youtube.com/watch?v=7roqteWLw4s
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Tweetbook.Contracts.V1;
using Tweetbook.Contracts.V1.Requests;
using Tweetbook.Contracts.V1.Responses;
@JaniKibichi
JaniKibichi / ussd.cs
Last active September 22, 2023 19:46
USSD on c#
/*
A few things to note about USSD:
USSD is session driven. Every request we send you will contain a sessionId, and this will be maintained until that session is completed
You will need to let the Mobile Service Provider know whether the session is complete or not. If the session is ongoing, please begin your response with CON. If this is the last response for that session, begin your response with END.
If we get a HTTP error response (Code 40X) from your script, or a malformed response (does not begin with CON or END, we will terminate the USSD session gracefully.
using visual studio 2013 or Greater
go to file > new > project
in the projects window choose web under C#
select ASP.NET Web Application and name your project as you like