Giter Club home page Giter Club logo

apipeline's People

Contributors

exilz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

apipeline's Issues

Impossible to add data in body in middleware.

I want to add some fields in body by middleware to each request, but merger ignores new body

export default async function middleware() {
    return {
      body: 'exampleText',
    };
// I tried return { fetchOptions: { body: 'exampleBody'}} also
  }
}

Fetching any kind of data, not just JSON

Hi! I'm trying to fetch data that does not return JSON, but rather returns RSS format. It returns an error:

[Error: SyntaxError: JSON Parse error: Unrecognized token '<']

Any help / alternative would be nice. Thanks!

Fetch both headers at data in the same request

Hi,

In the fetch method response data not having header status like 200, 400 ...etc
I need both the header status and data in my use-case.
How to get this header status in the response.

Thanks

updating cache on referch with disableCache: true

I'm trying to find a way to invalidate cache for an individual item which looks like is not possible at the moment. For example if I have an api like:

const API = {
   user: {
     path: 'user/:userId'
   }
} 

When I call api.get('user', {pathParameters: {userId: 'user1'}}) it will cache the response for user1. But at some point if user1 is updated and I want to invalidate cache only for user1 there is no way, I would have to clear the cache for all the users with clearCache('user'), if I understant correctly. Now I see that api.get() also allows you to override disableCache for a particular call. So technically I can re-fetch user1 with api.get('user', {pathParameters: {userId: 'user1'}, disableCache: true }) and get the latest values for user1.

I was assuming that the api would now update the existing cache for user1 to the latest value that it received in the seconds call. But looks like it doesn't. It would be neat if that was the case! Ootherwise next time I call api.get for user1 without disableCache again, I would be getting older version of the user that was returned in the first call.

I can shoot a PR if you think this makes sense to have.

How to Set Expiration Time on specific requests

Hi,

I'm getting API Data expiration time from API Response Header, So after calling the fetch method only i know the expiration time, So now i want set this time to cache expiration.
Please help me how to set cache expiration time after calling fetch menthod.

Add PATCH HTTP method

Why there is no PATCH method in supported methods? And how can i make PATCH request in react native app using apipipeline?

how to apply global headers?

currently I can' find a way to apply global Headers I have to apply it per service/request , or I'm missing something here?

Caching

I was wondering looking at the flowchart how the caching data is checked for stale state ?

app is crash when open

Hello
my app is crash and close after calling "OPEN database: apipeline.db"

this is log

01-20 08:50:25.864 29083 29120 I ReactNativeJS: 'Setting debug to:', false
01-20 08:50:25.865 29083 29120 I ReactNativeJS: Promise based runtime ready
01-20 08:50:25.866 29083 29120 I ReactNativeJS: OPEN database: apipeline.db
01-20 08:50:25.991 29083 29120 I ReactNativeJS: Running application "000000" with appParams: {"rootTag":1}. __DEV__ === false, development-level warning are OFF, performance optimizations are ON

any help ?

thnx

json() undefined when rawData is true

when rawData is true , it caches the response with response including the data as promise , so when retrieving it from the cache , the json method won't work.

any suggestions ?

Process responses through middlewares

Is it possible to add ability to process response through middlewares?
In many cases, I need to handle http status code or reformat the response body, and I'd like to write a middleware for these purposes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.