
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
api-gateway-react-native
Advanced tools
npm install api-gateway-react-native
mi
import ApiGatway from 'api-gateway-react-native';
const nativeHeaders = await ApiGatway.getHeaders();
nativeHeaders retrun neesssary header of your applicaiotion. add your own interfaecotor or http request header or RTK or whatable.
Example with RTK quaary with Merge headers into request
import { createApi } from '@reduxjs/toolkit/query/react';
import { fetchBaseQuery } from '@reduxjs/toolkit/query/react';
import ApiGatway from 'api-gateway-react-native';
const baseQueryWithNativeHeaders = async (args: any, api: any, extraOptions: any) => {
const baseQuery = fetchBaseQuery({
baseUrl: 'http://example.com', //
});
let nativeHeaders: Record<string, string> = {};
try {
nativeHeaders = await ApiGatway.getHeaders();
} catch (e: any) {
console.warn('Failed to get native headers:', e.message || e);
}
// Merge headers into request
const queryArgs =
typeof args === 'string'
? { url: args, headers: nativeHeaders }
: { ...args, headers: { ...args.headers, ...nativeHeaders } };
return baseQuery(queryArgs, api, extraOptions);
};
export const api = createApi({
reducerPath: 'api',
baseQuery: baseQueryWithNativeHeaders,
endpoints: (builder) => ({
getAuthCasbinTest: builder.query<any, void>({
query: () => '/exampleAPIEndpoint', // GET request
}),
}),
});
export const { useGetAuthCasbinTestQuery } = api;
apigw@technonext.com to get bind-client-config.json.bind-client-config.json in the root directory of your project.build.gradle.ktsAdd the Mapnests config-loader plugin.
Plugin: com.mapnests.config-loader:com.mapnests.config-loader.gradle.plugin:4.0.0
buildscript {
repositories {
mavenLocal()
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.13.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.2.21")
classpath("com.mapnests.config-loader:com.mapnests.config-loader.gradle.plugin:4.0.0")
}
}
Set Java and Kotlin compatibility:
plugins {
// other gradle plugins
id("com.mapnests.config-loader")
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}
TNApiGetwaySDK.xcframework into your project’s Project Navigator (e.g., into a Frameworks group).TNApiGetwaySDK.xcframework.add TNApiGetwaySDKConfigFile under your Info.plist
<dict>
<key>TNApiGetwaySDKConfigFile</key>
<string>bind-client-config.json</string>
</dict>
#Add your URLProtocol class to URLSession
let config = URLSessionConfiguration.default
config.protocolClasses = [ClientNetworkProtocol.self] // Inject framework headers
return URLSession(configuration: config)
For issues or feature requests contact us through email: apigw@technonext.com
FAQs
api-gatway-react-native-sdk
We found that api-gateway-react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.